/**
 * WPCrypto Shop Single Product Page Styles
 * Compact, modern and mobile-responsive design for single product pages
 * 
 * TABLE OF CONTENTS:
 * 1. MAIN CONTAINER & LAYOUT
 * 2. BREADCRUMB NAVIGATION
 * 3. PRODUCT IMAGE SECTION
 * 4. PRODUCT DETAILS SECTION
 * 5. PRODUCT ACTIONS
 * 6. PRODUCT CONTENT SECTION
 * 7. MOBILE RESPONSIVENESS
 * 8. LOADING STATES & ANIMATIONS
 * 9. ACCESSIBILITY IMPROVEMENTS
 */

/* ==========================================================================
   1. MAIN CONTAINER & LAYOUT
   ========================================================================== */

.wpcrypto-single-product-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 32px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid #e2e8f0;
}

.wpcrypto-single-product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: flex-start;
}

/* ==========================================================================
   2. BREADCRUMB NAVIGATION - COMPACT DESIGN
   ========================================================================== */

.wpcrypto-single-breadcrumb {
    margin-bottom: 32px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    font-size: 14px;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.wpcrypto-single-breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.wpcrypto-single-breadcrumb a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ==========================================================================
   3. PRODUCT IMAGE SECTION - MODERN & STICKY
   ========================================================================== */

.wpcrypto-single-product-image {
    position: sticky;
    top: 32px;
    background: #f8fafc;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.wpcrypto-single-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.wpcrypto-single-product-image:hover img {
    transform: scale(1.05);
}

.wpcrypto-single-no-image {
    text-align: center;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 600;
}

.wpcrypto-single-no-image span {
    font-size: 80px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ==========================================================================
   4. PRODUCT DETAILS SECTION - COMPACT & PROFESSIONAL
   ========================================================================== */

.wpcrypto-single-product-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.wpcrypto-single-product-title {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.wpcrypto-single-product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -8px 0 16px 0;
}

.wpcrypto-single-product-price {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.3);
    position: relative;
    overflow: hidden;
}

.wpcrypto-single-product-price::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: wpcrypto-shine 3s infinite;
}

@keyframes wpcrypto-shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.wpcrypto-single-price-amount {
    font-size: 40px;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.wpcrypto-single-product-stock {
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    border: 2px solid;
}

.wpcrypto-stock-available {
    color: #059669;
    background: #d1fae5;
    border-color: #10b981;
}

.wpcrypto-stock-unavailable {
    color: #dc2626;
    background: #fee2e2;
    border-color: #ef4444;
}

.wpcrypto-single-free-shipping {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.wpcrypto-single-product-meta {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.wpcrypto-single-product-meta div {
    margin-bottom: 12px;
    font-size: 14px;
    color: #64748b;
}

.wpcrypto-single-product-meta div:last-child {
    margin-bottom: 0;
}

.wpcrypto-single-product-meta strong {
    color: #1e293b;
    font-weight: 700;
}

.wpcrypto-single-category-link,
.wpcrypto-single-tag-link {
    display: inline-block;
    background: #e2e8f0;
    color: #475569;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    margin: 2px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.wpcrypto-single-category-link:hover,
.wpcrypto-single-tag-link:hover {
    background: #3b82f6;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.wpcrypto-single-product-excerpt {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    font-style: italic;
    color: #64748b;
    font-size: 16px;
    line-height: 1.6;
    border-left: 4px solid #3b82f6;
}

/* ==========================================================================
   5. PRODUCT ACTIONS - MODERN INTERFACE
   ========================================================================== */

.wpcrypto-single-product-actions {
    background: #f8fafc;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-top: 8px;
}

.wpcrypto-single-quantity {
    margin-bottom: 24px;
}

.wpcrypto-single-quantity label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: #1e293b;
    font-size: 16px;
}

.wpcrypto-single-quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 160px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wpcrypto-single-quantity-controls .wpcrypto-quantity-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: white;
    color: #3b82f6;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpcrypto-single-quantity-controls .wpcrypto-quantity-btn:hover {
    background: #3b82f6;
    color: white;
}

.wpcrypto-single-quantity-controls .wpcrypto-quantity-input {
    width: 64px;
    height: 48px;
    border: none;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    outline: none;
    background: white;
    color: #1e293b;
    -moz-appearance: textfield;
}

.wpcrypto-single-quantity-controls .wpcrypto-quantity-input::-webkit-outer-spin-button,
.wpcrypto-single-quantity-controls .wpcrypto-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wpcrypto-single-product-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.wpcrypto-single-product-buttons .wpcrypto-shop-btn {
    padding: 18px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.wpcrypto-single-product-buttons .wpcrypto-shop-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.wpcrypto-single-product-buttons .wpcrypto-shop-btn:hover::before {
    left: 100%;
}

.wpcrypto-single-add-to-cart {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.wpcrypto-single-add-to-cart:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.wpcrypto-single-buy-now {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.wpcrypto-single-buy-now:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.wpcrypto-shop-btn-disabled {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ==========================================================================
   6. PRODUCT CONTENT SECTION - CLEAN TYPOGRAPHY
   ========================================================================== */

.wpcrypto-single-product-content {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #e2e8f0;
}

.wpcrypto-single-content-header h2 {
    font-size: 28px;
    color: #1e293b;
    margin: 0 0 24px 0;
    text-align: center;
    font-weight: 800;
    position: relative;
    padding-bottom: 16px;
}

.wpcrypto-single-content-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.wpcrypto-single-content-body {
    background: #ffffff;
    padding: 32px;
    border-radius: 16px;
    line-height: 1.7;
    font-size: 16px;
    color: #374151;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.wpcrypto-single-content-body p {
    margin-bottom: 20px;
}

.wpcrypto-single-content-body p:last-child {
    margin-bottom: 0;
}

.wpcrypto-single-content-body h3,
.wpcrypto-single-content-body h4 {
    color: #1e293b;
    margin: 32px 0 16px 0;
    font-weight: 700;
}

.wpcrypto-single-content-body h3:first-child,
.wpcrypto-single-content-body h4:first-child {
    margin-top: 0;
}

.wpcrypto-single-content-body h3 {
    font-size: 22px;
}

.wpcrypto-single-content-body h4 {
    font-size: 18px;
}

.wpcrypto-single-content-body ul,
.wpcrypto-single-content-body ol {
    margin: 20px 0;
    padding-left: 24px;
}

.wpcrypto-single-content-body li {
    margin-bottom: 8px;
}

.wpcrypto-single-content-body strong {
    color: #1e293b;
    font-weight: 700;
}

.wpcrypto-single-content-body a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.wpcrypto-single-content-body a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ==========================================================================
   7. MOBILE RESPONSIVENESS
   ========================================================================== */

@media (max-width: 992px) {
    .wpcrypto-single-product-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .wpcrypto-single-product-image {
        position: static;
        max-width: 500px;
        margin: 0 auto;
    }

    .wpcrypto-single-product-title {
        font-size: 32px;
    }

    .wpcrypto-single-price-amount {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .wpcrypto-single-product-container {
        margin: 20px 10px;
        padding: 24px;
    }

    .wpcrypto-single-product-title {
        font-size: 28px;
    }

    .wpcrypto-single-price-amount {
        font-size: 32px;
    }

    .wpcrypto-single-product-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .wpcrypto-single-quantity-controls {
        max-width: 140px;
    }

    .wpcrypto-single-quantity-controls .wpcrypto-quantity-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .wpcrypto-single-quantity-controls .wpcrypto-quantity-input {
        width: 60px;
        height: 40px;
        font-size: 16px;
    }

    .wpcrypto-single-content-body {
        padding: 24px;
        font-size: 15px;
    }

    .wpcrypto-single-content-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .wpcrypto-single-product-container {
        margin: 10px 5px;
        padding: 16px;
    }

    .wpcrypto-single-breadcrumb {
        padding: 12px 16px;
        margin-bottom: 24px;
        font-size: 12px;
    }

    .wpcrypto-single-product-main {
        gap: 24px;
        margin-bottom: 32px;
    }

    .wpcrypto-single-product-title {
        font-size: 24px;
    }

    .wpcrypto-single-price-amount {
        font-size: 28px;
    }

    .wpcrypto-single-product-price {
        padding: 20px;
    }

    .wpcrypto-single-product-actions {
        padding: 20px;
    }

    .wpcrypto-single-product-buttons .wpcrypto-shop-btn {
        padding: 16px 20px;
        font-size: 14px;
    }

    .wpcrypto-single-content-body {
        padding: 20px;
        font-size: 14px;
    }

    .wpcrypto-single-content-header h2 {
        font-size: 20px;
    }

    .wpcrypto-single-quantity-controls {
        max-width: 120px;
    }

    .wpcrypto-single-quantity-controls .wpcrypto-quantity-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .wpcrypto-single-quantity-controls .wpcrypto-quantity-input {
        width: 48px;
        height: 36px;
        font-size: 14px;
    }
}

/* ==========================================================================
   8. LOADING STATES & ANIMATIONS
   ========================================================================== */

@keyframes wpcrypto-loading {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

.wpcrypto-loading {
    animation: wpcrypto-loading 1.5s infinite;
}

.wpcrypto-single-product-buttons .wpcrypto-shop-btn.loading {
    position: relative;
    color: transparent;
}

.wpcrypto-single-product-buttons .wpcrypto-shop-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ==========================================================================
   9. ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .wpcrypto-single-product-image img,
    .wpcrypto-single-quantity-controls .wpcrypto-quantity-btn,
    .wpcrypto-single-product-buttons .wpcrypto-shop-btn,
    .wpcrypto-single-category-link,
    .wpcrypto-single-tag-link {
        transition: none;
    }

    .wpcrypto-single-product-image:hover img {
        transform: none;
    }

    .wpcrypto-single-product-price::before {
        animation: none;
    }
}

@media (prefers-contrast: high) {
    .wpcrypto-single-product-container {
        border: 3px solid #000;
    }

    .wpcrypto-single-product-title {
        color: #000;
    }

    .wpcrypto-single-breadcrumb a {
        color: #0066cc;
        font-weight: 800;
    }

    .wpcrypto-single-category-link,
    .wpcrypto-single-tag-link {
        border: 2px solid #000;
        font-weight: 800;
    }

    .wpcrypto-single-quantity-controls .wpcrypto-quantity-btn {
        border: 2px solid #000;
        font-weight: 900;
    }

    .wpcrypto-single-product-buttons .wpcrypto-shop-btn {
        border: 2px solid #000;
        font-weight: 900;
    }
}