/* ============================================================================
   PRODUCTS.CSS - Main stylesheet for all product pages
   ============================================================================ */

   :root {
    --primary-green: #2D5F3F;
    --secondary-green: #4A7C59;
    --accent-gold: #D4AF37;
    --text-dark: #2C3E50;
    --text-gray: #6C757D;
    --light-bg: #F8F9FA;
    --cream-bg: #FDF8F3;
    --border-color: #E5E5E5;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: white;
}

/* ============================================================================
   HERO SECTIONS
   ============================================================================ */

.hero-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    padding: 8rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/images/hero-bg.png') no-repeat;
    background-size: 100% auto
    opacity: 0.9;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-section p {
    font-size: 2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-family: "Barlow", sans-serif;
    font-weight:300;
    font-style: normal;
}

/* ============================================================================
   PRODUCT GRID
   ============================================================================ */

.products-section {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-gray);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.product-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 320px;
    background-color: var(--light-bg);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--accent-gold);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-badge.sale {
    background-color: #E74C3C;
}

.product-badge.new {
    background-color: var(--primary-green);
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wishlist-btn:hover {
    background-color: var(--primary-green);
    color: white;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.875rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.product-name a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.product-name a:hover {
    color: var(--primary-green);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: var(--accent-gold);
}

.rating-count {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
}

.original-price {
    font-size: 1.125rem;
    color: var(--text-gray);
    text-decoration: line-through;
}

.discount-percent {
    background-color: #FEE;
    color: #E74C3C;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-green);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background-color: var(--secondary-green);
}

.btn-outline {
    background-color: white;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-outline:hover {
    background-color: var(--primary-green);
    color: white;
}

/* ============================================================================
   FILTERS & SORTING
   ============================================================================ */

.filter-section {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-dark);
}

.filter-group select,
.filter-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

/* ============================================================================
   PRODUCT DETAIL PAGE
   ============================================================================ */

.product-detail-section {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--light-bg);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.thumbnail {
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail.active,
.thumbnail:hover {
    border-color: var(--primary-green);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.product-description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.product-features {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.product-features h3 {
    margin-bottom: 1rem;
    color: var(--primary-green);
}

.product-features ul {
    list-style: none;
    padding: 0;
}

.product-features li {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-features li::before {
    content: '✓';
    color: var(--primary-green);
    font-weight: 700;
    font-size: 1.25rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quantity-selector label {
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    background-color: var(--light-bg);
    border: none;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: var(--border-color);
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: none;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.variant-selector {
    margin-bottom: 2rem;
}

.variant-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.variant-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.variant-option {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.variant-option:hover,
.variant-option.selected {
    border-color: var(--primary-green);
    background-color: var(--primary-green);
    color: white;
}

.add-to-cart-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-large {
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
}

.product-tabs {
    margin-top: 4rem;
}

.tab-headers {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.tab-header {
    padding: 1rem 2rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-gray);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-header.active {
    color: var(--primary-green);
    border-bottom-color: var(--primary-green);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================================================
   COLLECTIONS & CATEGORIES
   ============================================================================ */

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.collection-card {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.collection-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.collection-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.collection-card:hover img {
    transform: scale(1.1);
}

.collection-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    color: white;
    z-index: 2;
}

.collection-info h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #bedf97;
}

.collection-info p {
    font-size: 1rem;
    opacity: 0.9;
}

/* ============================================================================
   SEARCH & CONTACT
   ============================================================================ */

.search-section {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.search-box input {
    flex: 1;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.125rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-green);
}

.contact-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-info-card {
    background-color: var(--light-bg);
    padding: 3rem;
    border-radius: 12px;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-green);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section{
        background: none;
        background-image: url('/static/images/bg_mobile.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        min-height: 400px;
    }

    .hero-section::before {
        /* Remove desktop pseudo-element background */
        background: none;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .product-detail-grid,
    .contact-grid,
    .collection-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-options {
        grid-template-columns: 1fr;
    }
}
