/* Products CSS - Luxury Product Sections for Ziyorate */

/* Collections Section */
.collections {
    padding: var(--space-24) 0;
    background: var(--white);
    position: relative;
}

.collections::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to bottom, var(--cream-50), transparent);
    opacity: 0.6;
}

/* Collections Grid */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
}

/* Collection Card */
/* Collection Card Fixes */
.collection-card {
    position: relative;
    border-radius: var(--radius-3xl);
    overflow: hidden;
    box-shadow: var(--shadow-luxury);
    transition: all var(--transition-luxury);
    height: 400px;
    /* Ensure proper stacking context */
    z-index: 1;
}

.collection-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-luxury-lg);
    /* Increase z-index on hover to prevent overlapping issues */
    z-index: 10;
}

/* Collection Image - Fixed positioning */
.collection-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Ensure image container doesn't interfere with overlay */
    z-index: 1;
}

.collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-luxury);
    /* Remove any potential z-index conflicts */
    position: relative;
    z-index: 1;
}

/* Collection Overlay - Fixed visibility and positioning */
.collection-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 41, 34, 0.8) 0%,
        rgba(27, 77, 62, 0.6) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: var(--space-8);
    /* Start with opacity 0 but ensure it's always visible in DOM */
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-luxury);
    /* Higher z-index to appear above image */
    z-index: 2;
    /* Ensure pointer events work */
    pointer-events: none;
}

.collection-card:hover .collection-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Collection Info - Fixed transform timing and forced white text */
.collection-info {
    color: #ffffff !important;
    transform: translateY(20px);
    transition: transform var(--transition-luxury);
    /* Ensure text is always above background */
    position: relative;
    z-index: 3;
    width: 100%;
}

.collection-card:hover .collection-info {
    transform: translateY(0);
}

.collection-name {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--font-medium);
    color: #ffffff !important;
    margin-bottom: var(--space-2);
}

.collection-description {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: var(--space-4);
    line-height: 1.6;
}

.collection-price {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: #ffffff !important;
    margin-bottom: var(--space-4);
}

/* Collection Badge - Fixed positioning to not interfere */
.collection-badge {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    /* High z-index to always appear on top */
    z-index: 4;
    background: var(--green-700);
    color: var(--white);
}

/* Collection Button - Enhanced interaction */
.collection-btn {
    background: var(--white);
    color: var(--green-800);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: all var(--transition-luxury);
    display: inline-block;
    position: relative;
    z-index: 5;
    /* Ensure button is interactive */
    pointer-events: all;
}

.collection-btn:hover {
    background: var(--gold-500);
    color: var(--white);
    transform: translateY(-2px);
}

/* Additional fix for better hover detection */
.collection-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Ensure smooth transitions */
.collection-card * {
    box-sizing: border-box;
}

/* Fix for featured cards */
.collection-card.featured {
    grid-column: span 2;
    height: 500px;
    /* Ensure featured cards also work properly */
    z-index: 1;
}

.collection-card.featured:hover {
    z-index: 10;
}

/* Mobile responsiveness fixes */
@media (max-width: 768px) {
    /* Keep the same hover behavior on mobile - details only show on tap/hover */
    .collection-overlay {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    
    .collection-card:hover .collection-overlay,
    .collection-card:active .collection-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }
    
    .collection-info {
        transform: translateY(20px);
    }
    
    .collection-card:hover .collection-info,
    .collection-card:active .collection-info {
        transform: translateY(0);
    }
    
    /* Make cards slightly easier to tap on mobile */
    .collection-card {
        min-height: 300px;
    }
    
    .collection-card.featured {
        height: 400px;
    }
}

/* Featured Products Section */
.featured-products {
    padding: var(--space-24) 0;
    background: var(--cream-50);
}

/* Products Grid - Updated to show 4 items in one row */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-luxury);
    transition: all var(--transition-luxury);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-luxury-lg);
}

/* Product Image Container */
.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--cream-100);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-luxury);
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

/* Product Actions */
.product-actions {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    opacity: 0;
    transform: translateX(20px);
    transition: all var(--transition-luxury);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-action {
    width: 44px;
    height: 44px;
    background: var(--white);
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-luxury);
    color: var(--neutral-600);
}

.product-action:hover {
    background: var(--green-700);
    color: var(--white);
    transform: scale(1.1);
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.product-badge.bestseller {
    background: var(--gold-500);
    color: var(--white);
}

.product-badge.new {
    background: #10B981;
    color: var(--white);
}

.product-badge.limited {
    background: var(--green-700);
    color: var(--white);
}

/* Product Info */
.product-info {
    padding: var(--space-6);
}

.product-name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    color: var(--green-800);
    margin-bottom: var(--space-2);
    line-height: 1.3;
}

.product-description {
    font-size: var(--text-sm);
    color: var(--neutral-600);
    margin-bottom: var(--space-4);
    line-height: 1.6;
}

/* Product Pricing */
.product-pricing {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.current-price {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--gold-600);
    font-family: var(--font-display);
}

.original-price {
    font-size: var(--text-lg);
    color: var(--neutral-400);
    text-decoration: line-through;
}

.discount {
    background: #EF4444;
    color: var(--white);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.stars {
    display: flex;
    gap: 1px;
}

.stars i {
    color: var(--gold-500);
    font-size: var(--text-sm);
}

.stars i.far {
    color: var(--neutral-300);
}

.rating-count {
    font-size: var(--text-sm);
    color: var(--neutral-500);
}

/* Add to Cart Button */
.add-to-cart-btn {
    width: 100%;
    background: var(--green-700);
    color: var(--white);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-xl);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-luxury);
    position: relative;
    overflow: hidden;
}

.add-to-cart-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: var(--transition-luxury);
}

.add-to-cart-btn:hover {
    background: var(--green-800);
    transform: translateY(-2px);
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* Brand Story Section */
.brand-story {
    padding: var(--space-24) 0;
    background: var(--white);
}

.story-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.story-text {
    max-width: 600px;
}

.story-description {
    font-size: var(--text-lg);
    color: var(--neutral-600);
    line-height: 1.7;
    margin-bottom: var(--space-6);
}

.story-highlights {
    display: grid;
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.highlight h4 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--green-800);
    margin-bottom: var(--space-2);
}

.highlight p {
    color: var(--neutral-600);
    line-height: 1.6;
}

.story-visual {
    position: relative;
}

.story-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-luxury);
}

/* Price Collections Section */
.price-collections {
    padding: var(--space-24) 0;
    background: var(--cream-50);
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.price-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-luxury);
    transition: all var(--transition-luxury);
    position: relative;
    border: 2px solid transparent;
}

.price-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-luxury-lg);
    border-color: var(--gold-400);
}

.price-card.featured {
    background: var(--green-700);
    color: var(--white);
    transform: scale(1.05);
}

.price-card.featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.price-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold-500);
    color: var(--white);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
}

.price-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.price-range {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--font-medium);
    color: var(--green-800);
    margin-bottom: var(--space-2);
}

.price-card.featured .price-range {
    color: var(--white);
}

.price-title {
    font-size: var(--text-lg);
    color: var(--neutral-600);
    font-weight: var(--font-medium);
}

.price-card.featured .price-title {
    color: rgba(255, 255, 255, 0.9);
}

.price-features ul {
    list-style: none;
    margin-bottom: var(--space-6);
}

.price-features li {
    padding: var(--space-2) 0;
    color: var(--neutral-600);
    position: relative;
    padding-left: var(--space-6);
}

.price-card.featured .price-features li {
    color: rgba(255, 255, 255, 0.9);
}

.price-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold-500);
    font-weight: var(--font-semibold);
}

.price-cta {
    text-align: center;
}

.collection-size {
    display: block;
    font-size: var(--text-sm);
    color: var(--neutral-500);
    margin-bottom: var(--space-4);
}

.price-card.featured .collection-size {
    color: rgba(255, 255, 255, 0.8);
}

.price-btn {
    background: var(--green-700);
    color: var(--white);
    padding: var(--space-3) var(--space-8);
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: all var(--transition-luxury);
    display: inline-block;
}

.price-card.featured .price-btn {
    background: var(--white);
    color: var(--green-700);
}

.price-btn:hover {
    background: var(--green-800);
    transform: translateY(-2px);
}

.price-card.featured .price-btn:hover {
    background: var(--gold-500);
    color: var(--white);
}

/* Mobile Responsiveness */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }
    
    .collection-card.featured {
        grid-column: span 1;
        height: 400px;
    }
    
    .story-content {
        gap: var(--space-12);
    }
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
}

@media (max-width: 768px) {
    .collections-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
    
    .story-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .story-image {
        height: 300px;
    }
    
    .price-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .price-card.featured {
        transform: none;
    }
    
    .price-card.featured:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

@media (max-width: 480px) {
    .collection-overlay {
        padding: var(--space-4);
    }
    
    .collection-name {
        font-size: var(--text-2xl);
    }
    
    .collection-description {
        font-size: var(--text-base);
    }
    
    .product-info {
        padding: var(--space-4);
    }
    
    .price-card {
        padding: var(--space-6);
    }
    
    .product-name {
        font-size: var(--text-lg);
    }
    
    .current-price {
        font-size: var(--text-xl);
    }
}