/* -------------------------------------------------------------------------- */
/* BASE & TYPOGRAPHY - Added for Premium Feel */
/* -------------------------------------------------------------------------- */

body {
    margin: 0;
    /* Use a modern, readable font stack */
    font-family: 'Inter', 'Poppins', Arial, sans-serif; 
    background: #eef1f4;
    color: #333;
    line-height: 1.6;
}

/* -------------------------------------------------------------------------- */
/* HEADER & NAVIGATION (Updated based on your history) */
/* -------------------------------------------------------------------------- */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1c2b39; /* Deep Navy Header */
    color: white;
    padding: 10px 30px; 
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

header .logo {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700; /* Gold accent for logo */
}

nav a {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 15px;
    text-decoration: none;
    font-size: 1rem; 
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #ffd700; /* Gold on hover */
}

/* Hamburger menu styles (retained/simplified from history) */
.menu-toggle {
    display: none; 
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger-icon {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

/* -------------------------------------------------------------------------- */
/* PREMIUM HERO SECTION */
/* -------------------------------------------------------------------------- */

.hero-premium {
    /* Dramatic background to make it stand out */
    background: linear-gradient(135deg, #1c2b39 0%, #3e5c76 100%); 
    color: white;
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: -1px;
    color: #ffffff;
}

.hero-content p {
    font-size: 1.3rem;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: rgba(255, 255, 255, 0.9);
}

.hero-cta-btn {
    display: inline-block;
    background-color: #ffd700; /* Gold CTA button */
    color: #1c2b39;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: background-color 0.3s, transform 0.2s;
}

.hero-cta-btn:hover {
    background-color: #e6c100;
    transform: translateY(-2px);
}


/* -------------------------------------------------------------------------- */
/* PRODUCT SECTION & CARDS (Premium Redesign) */
/* -------------------------------------------------------------------------- */

.product-section {
    padding: 40px 25px; 
    background: #eef1f4; 
}

.product-section h2 {
    margin-bottom: 35px;
    font-size: 2.2rem; 
    font-weight: 800; 
    color: #1a1a1a;
    text-align: center;
    letter-spacing: 0.05em; 
}

.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
    gap: 30px; 
    padding-bottom: 10px;
}

/* Scrollbar styles remain */
.product-container::-webkit-scrollbar {
    height: 8px;
}
.product-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.product-container::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.product-card {
    background: #ffffff; /* Clean white card */
    padding: 20px; 
    border-radius: 16px; 
    /* Soft, floating shadow */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);      
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease; 
    height: 350px; 
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05); 
}

.product-image-wrapper {
    height: 220px; /* Increased from 180px for a slightly larger image */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: #f8f8f8;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05); /* Inner shadow for depth */
}

.product-card img {
    width: 90%; /* Keep image slightly smaller than wrapper for padding effect */
    max-height: 100%; 
    object-fit: contain; 
    background: transparent; 
    border-radius: 0; 
    margin-bottom: 0; 
    box-shadow: none;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card h3 {
    font-size: 1.25rem; 
    font-weight: 700; 
    margin: 5px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    color: #1a1a1a;
    letter-spacing: -0.01em; 
}

/* --- PRICE GROUP STYLING --- */

/* Wrapper for the two prices */
.product-card .price-group {
    text-align: left;
    margin: 5px 0 5px 0;
}

/* Higher, cut-marked price */
.product-card .strikethrough-price {
    font-size: 0.9rem; /* Smaller size for the old price */
    color: #888; /* Muted color */
    text-decoration: line-through;
    font-weight: 500;
    margin: 0;
    line-height: 1.2; /* Keep it compact */
}

/* Ensure the selling price remains dominant */
.product-card p.product-price {
    font-weight: 800; 
    color: #c46237; /* Copper/Bronze */
    margin: 0; 
    text-align: left;
    font-size: 1.4rem; 
    letter-spacing: 0.02em;
}
/* --- END OF NEW PRICE GROUP STYLING --- */


.product-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); 
}

.product-card:hover img {
    transform: scale(1.05); /* Increased zoom for attraction */
}


/* Small, In-a-Row Buttons (Confirmed) */
.product-card .product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    margin-top: auto; 
    flex-direction: row; 
    gap: 10px; /* Reduced gap slightly */
}

.product-card .add-to-cart-btn,
.product-card .buy-now-btn {
    font-weight: 600;
    padding: 8px 12px; /* Small, compact buttons */
    font-size: 0.85em; /* Slightly smaller font for compactness */
    border: none;
    border-radius: 6px; /* Slightly squarer, professional look */
    cursor: pointer;
    text-decoration: none;
    color: white;
    text-align: center;
    flex-grow: 1; 
    transition: background-color 0.3s ease, transform 0.1s, box-shadow 0.3s ease;
}

/* --- PREMIUM COLOR SCHEME --- */

.product-card .add-to-cart-btn {
    background-color: #1c4558; /* Deep Navy/Teal - Primary Action */
    box-shadow: 0 4px 10px rgba(28, 69, 88, 0.3);
}

.product-card .buy-now-btn {
    background-color: #c46237; /* Rich Copper/Bronze - Accent Action */
    box-shadow: 0 4px 10px rgba(196, 98, 55, 0.4);
}

.product-card .add-to-cart-btn:hover {
    background-color: #153545;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(28, 69, 88, 0.5);
}

.product-card .buy-now-btn:hover {
    background-color: #b05931;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(196, 98, 55, 0.6);
}

/* -------------------------------------------------------------------------- */
/* TOP ACTIONS, FILTERS, & SEARCH FIXES (DESKTOP - DO NOT TOUCH) */
/* -------------------------------------------------------------------------- */

.top-page-actions {
    display: flex;
    justify-content: space-between; /* Pushes filter group LEFT, action group RIGHT */
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
    width: 100%; /* Ensure it spans full width */
    box-sizing: border-box;
}

/* Filter form styling - FORCED LEFT ALIGNMENT */
.filter-form {
    display: flex;
    gap: 8px; /* Minimal space between selects and Apply button */
    align-items: center;
}

/* New container to group Search and Cart on the right */
.action-group-right {
    display: flex;
    align-items: center;
    /* Reduced gap for minimal spacing between Search and Cart */
    gap: 10px; 
}

.apply-filters-btn {
    padding: 8px 12px;
    background-color: #1c4558; /* Changed color to match deep navy theme */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.apply-filters-btn:hover {
    background-color: #153545;
}

.clear-filters-btn {
    text-decoration: none;
    color: #cc0000;
    font-size: 14px;
    padding: 5px;
    white-space: nowrap;
}

/* --- Minimal Search Toggling Fixes (Desktop) --- */

.minimal-search-container {
    position: relative; 
    width: auto; 
    height: 40px; 
    display: flex; 
    align-items: center;
}

/* The Search Form itself - Initially hidden */
.minimal-search-form {
    display: none;
    position: absolute;
    /* Anchor it to the right edge of its parent container (minimal-search-container) */
    right: 0; 
    top: 50%;
    transform: translateY(-50%);
    width: 200px; /* Define a fixed width for the expanded bar */
    z-index: 10;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    /* Ensures the form's input and button are aligned */
    display: flex; 
}

/* Search Form when Toggled Visible (overrides the initial display:none) */
.minimal-search-form.is-visible {
    display: flex;
}

/* Search Input inside the form */
.minimal-search-form input[type="search"] {
    flex-grow: 1;
    padding: 8px 10px;
    border: none;
}

/* Search Submit Button inside the form */
.minimal-search-form .search-submit-btn {
    background: #ffd700; /* Use Gold accent color for visibility */
    color: #1c2b39;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
}

/* The toggle button (initially visible) */
.search-toggle-btn {
    background-color: #ffd700;
    color: #1c2b39;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/* MOBILE STYLES (Responsive Premium Look) */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero-premium {
        padding: 50px 15px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }

    /* 🛑 MOBILE FIXES: Set up two-row layout */
    .top-page-actions {
        flex-direction: column;
        align-items: flex-start; /* Align all groups to the left */
        gap: 0; /* Remove gap here, we'll add vertical space on the rows */
        padding: 10px;
    }

    /* ROW 1: Filters (Full Width) */
    .filter-dropdowns-container {
        width: 100%; 
        margin-bottom: 10px; /* Add space below the filters row */
    }
    .filter-form {
        display: flex; /* Keep dropdowns inline on this row */
        flex-wrap: wrap; 
        width: 100%;
        gap: 6px; 
    }
    .filter-form select, .apply-filters-btn {
        flex-grow: 1;
        min-width: 120px;
        box-sizing: border-box; /* Important for width calculation with flex-grow */
    }
    /* Ensure all elements on row 1 are equally spaced */
    .filter-form select, .apply-filters-btn, .clear-filters-btn {
        margin-top: 5px; /* Add small vertical spacing in wrap mode */
    }
    .clear-filters-btn {
        margin-left: 10px;
    }

    /* ROW 2: Actions (Search & Cart) */
    .action-group-right {
        width: 100%;
        justify-content: flex-start; /* Align search and cart to the left */
        align-items: center; 
        margin-top: 5px; /* Ensures minimal vertical space */
        gap: 15px; /* Space between Search and Cart */
    }
    
    /* Search element sizing on mobile */
    .minimal-search-container {
        position: static;
        flex-grow: 1; 
        max-width: 60%; /* Give search bar a reasonable size */
    }
    
    .minimal-search-form {
        position: static; 
        width: 100%;
        border: none;
        transform: none;
        box-shadow: none;
        display: flex;
    }
    
    .minimal-search-container .search-toggle-btn {
        display: block;
    }
    /* END MOBILE FIXES */
    
    /* Mobile product grid adjustments */
    .product-section {
        padding: 20px 10px;
    }
    .product-section h2 {
        font-size: 1.8rem;
    }

    .product-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 
        gap: 10px;
    }

    .product-card {
        height: 160px; 
        padding: 5px;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); 
    }
    
    .product-image-wrapper {
        height: 100px;
        margin-bottom: 10px;
    }

    .product-card h3 {
        font-size: 0.95rem;
        margin: 2px 0;
    }
    
    /* NEW MOBILE STYLES FOR PRICE GROUP */
    .product-card .price-group {
        margin: 2px 0 8px 0;
    }
    .product-card .strikethrough-price {
        font-size: 0.75rem;
        line-height: 1;
    }
    .product-card p.product-price {
        font-size: 1.05rem;
        margin: 0;
    }

    .product-card .product-actions {
        margin-top: 5px;
        gap: 6px; 
    }
    
    .product-card .add-to-cart-btn,
    .product-card .buy-now-btn {
        padding: 2px 3px; 
        font-size: 0.7em; 
        border-radius: 5px;
    }
    
    /* Header/Nav mobile adjustments */
    .main-nav {     
        display: none;
        flex-direction: column;
        background: #1c2b39e1;
        position: fixed;
        top: 60px; 
        left: 0;
        width: 100%;       
        padding: 10px 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    .main-nav a {
        padding: 10px 20px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .main-nav.is-open {
        display: flex;
    }

    header {
        padding: 10px 15px;
    }
}