/* ==========================================
   Cart & Checkout Styles - Gift Brand
   ========================================== */

/* Product Page Layout */
.product-page {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--color-bg, #fffaf5);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    font-size: 14px;
    color: var(--color-text-muted, #999);
}

.breadcrumb a {
    color: var(--color-text-secondary, #666);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--color-accent, #e07c5f);
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
    align-self: start;
}

.main-image {
    aspect-ratio: 1;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-image .image-placeholder {
    font-size: 120px;
    opacity: 0.2;
}

.thumbnail-gallery {
    display: flex;
    gap: 12px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    border: 2px solid transparent;
    background: white;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
    border-color: var(--color-accent, #e07c5f);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Details */
.product-details {
    padding-top: 20px;
}

.product-details .product-badges {
    margin-bottom: 12px;
}

.product-details .product-category {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-accent, #e07c5f);
    margin-bottom: 8px;
}

.product-details .product-title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.2;
    color: var(--color-text-primary, #2c3e50);
}

.product-details .product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.product-details .product-rating .stars {
    color: #f4a261;
    font-size: 16px;
    letter-spacing: 2px;
}

.product-details .product-rating .rating-text {
    font-size: 14px;
    color: var(--color-text-secondary, #666);
}

.product-details .product-price {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.product-details .current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-accent, #e07c5f);
}

.product-details .original-price {
    font-size: 20px;
    color: var(--color-text-muted, #999);
    text-decoration: line-through;
}

.product-details .discount-badge {
    background: #e07c5f;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.product-details .product-description {
    color: var(--color-text-secondary, #666);
    line-height: 1.8;
    margin-bottom: 32px;
}

/* Options */
.option-section {
    margin-bottom: 24px;
}

.option-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    color: var(--color-text-secondary, #666);
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-btn {
    min-width: 50px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e8e0d8;
    color: var(--color-text-primary, #2c3e50);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.size-btn:hover {
    border-color: var(--color-accent, #e07c5f);
}

.size-btn.active {
    background: var(--color-accent, #e07c5f);
    border-color: var(--color-accent, #e07c5f);
    color: white;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.variant-btn {
    width: 44px;
    height: 44px;
    padding: 4px;
    background: white;
    border: 2px solid #e8e0d8;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.variant-btn:hover:not([disabled]) {
    border-color: var(--color-accent, #e07c5f);
}

.variant-btn.active {
    border-color: var(--color-accent, #e07c5f);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-accent, #e07c5f);
}

.variant-btn.out-of-stock {
    opacity: 0.3;
    cursor: not-allowed;
}

.variant-color {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}

/* Quantity Selector */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 2px solid #e8e0d8;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 44px;
    height: 44px;
    background: white;
    border: none;
    color: var(--color-text-primary, #2c3e50);
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #f5f0eb;
}

.quantity-selector input {
    width: 60px;
    height: 44px;
    border: none;
    border-left: 2px solid #e8e0d8;
    border-right: 2px solid #e8e0d8;
    background: white;
    color: var(--color-text-primary, #2c3e50);
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

/* Stock Status */
.stock-status {
    margin-bottom: 24px;
    font-size: 14px;
}

.stock-status .in-stock {
    color: #4ade80;
}

.stock-status .out-of-stock {
    color: #f87171;
}

/* Add to Cart Button */
.product-details .add-to-cart-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 32px;
    background: var(--color-accent, #e07c5f);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 32px;
}

.product-details .add-to-cart-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(224, 124, 95, 0.3);
}

.product-details .add-to-cart-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Accordion */
.product-accordion {
    border-top: 1px solid #e8e0d8;
}

.accordion-item {
    border-bottom: 1px solid #e8e0d8;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    background: transparent;
    border: none;
    color: var(--color-text-primary, #2c3e50);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.accordion-icon {
    font-size: 20px;
    color: var(--color-text-muted, #999);
}

.accordion-content {
    display: none;
    padding-bottom: 20px;
    color: var(--color-text-secondary, #666);
    font-size: 14px;
    line-height: 1.7;
}

.accordion-item.open .accordion-content {
    display: block;
}

/* Reviews Section */
.reviews-section {
    margin-bottom: 80px;
    padding-top: 40px;
    border-top: 1px solid #e8e0d8;
}

.reviews-section h2 {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 28px;
    margin-bottom: 32px;
    color: var(--color-text-primary, #2c3e50);
}

.rating-overview {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.big-rating {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 56px;
    font-weight: 600;
    color: var(--color-accent, #e07c5f);
}

.review-count {
    display: block;
    font-size: 14px;
    color: var(--color-text-muted, #999);
    margin-top: 4px;
}

.reviews-list {
    display: grid;
    gap: 24px;
}

.review-card {
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.review-card .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.review-card .review-author {
    font-weight: 600;
    color: var(--color-text-primary, #2c3e50);
}

.review-card .review-stars {
    color: #f4a261;
    font-size: 14px;
}

.review-card .review-text {
    color: var(--color-text-secondary, #666);
    line-height: 1.7;
    margin-bottom: 12px;
}

.review-card .review-date {
    font-size: 12px;
    color: var(--color-text-muted, #999);
}

/* Related Products */
.related-products {
    padding-top: 40px;
    border-top: 1px solid #e8e0d8;
}

.related-products h2 {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 28px;
    margin-bottom: 32px;
    color: var(--color-text-primary, #2c3e50);
}

/* ==========================================
   Cart Sidebar
   ========================================== */

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    background: var(--color-bg, #fffaf5);
    border-left: 1px solid #e8e0d8;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e8e0d8;
}

.cart-header h2 {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 24px;
    color: var(--color-text-primary, #2c3e50);
}

.cart-close {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--color-text-primary, #2c3e50);
    font-size: 28px;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e8e0d8;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    opacity: 0.3;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text-primary, #2c3e50);
}

.cart-item-variant {
    font-size: 13px;
    color: var(--color-text-muted, #999);
    margin-bottom: 8px;
}

.cart-item-price {
    font-weight: 700;
    color: var(--color-accent, #e07c5f);
    margin-bottom: 12px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    background: white;
    border: 1px solid #e8e0d8;
    color: var(--color-text-primary, #2c3e50);
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
}

.cart-item-qty span {
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--color-text-muted, #999);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 8px;
}

.cart-item-remove:hover {
    color: #f87171;
}

.cart-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.cart-empty.active {
    display: flex;
}

.cart-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.cart-empty p {
    color: var(--color-text-secondary, #666);
    margin-bottom: 24px;
}

.btn-continue {
    padding: 14px 32px;
    background: var(--color-accent, #e07c5f);
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid #e8e0d8;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-primary, #2c3e50);
}

.cart-note {
    font-size: 13px;
    color: var(--color-text-muted, #999);
    margin-bottom: 20px;
}

.btn-checkout {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--color-accent, #e07c5f);
    color: white;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(224, 124, 95, 0.3);
}

.btn-continue-shopping {
    display: block;
    text-align: center;
    color: var(--color-text-secondary, #666);
    font-size: 14px;
}

.btn-continue-shopping:hover {
    color: var(--color-accent, #e07c5f);
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 1024px) {
    .product-layout {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .product-page {
        padding-top: 80px;
    }
    
    .product-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .product-gallery {
        position: static;
    }
    
    .product-details .product-title {
        font-size: 28px;
    }
    
    .product-details .current-price {
        font-size: 28px;
    }
    
    .cart-sidebar {
        width: 100%;
    }
    
    .rating-overview {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .breadcrumb {
        font-size: 12px;
        gap: 8px;
    }
    
    .product-details .product-title {
        font-size: 24px;
    }
    
    .size-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .cart-item {
        gap: 12px;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
}
