/* --- CSS VARIABLES & RESET --- */
:root {
    /* Palette - Modern Pink & Charcoal */
    --bg-body: #f8f9fa;
    /* Light Gray for differentiation */
    --bg-soft: #fff1f2;
    /* Rose 50 */
    --bg-card: #ffffff;
    --bg-footer: #1a1a1a;

    --text-main: #2e2e2e;
    --text-muted: #757575;
    --text-light: #ffffff;

    --accent-primary: #be185d;
    /* Pink 700 - Deep Raspberry */
    --accent-hover: #9d174d;
    /* Pink 800 */
    --accent-light: #fce7f3;
    /* Pink 100 */

    --border-color: #fbcfe8;
    /* Pink 200 */

    /* Typography */
    --font-heading: 'Tenor Sans', sans-serif;
    --font-body: 'Urbanist', sans-serif;

    /* Spacing */
    --container-width: 1280px;
    --header-height: 80px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 5rem;

    /* Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Softer shadow for cards */
    --shadow-md: 0 10px 15px -3px rgba(190, 24, 93, 0.15);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* --- UTILITIES --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 400;
    color: var(--text-main);
}

.section-subtitle {
    text-align: center;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
}

/* Animation classes */
.fade-in-up {
    opacity: 1;
    /* Changed to 1 to ensure visibility even if JS fails */
    transform: translateY(0);
    /* Changed to 0 so it's in place */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    background: transparent;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 700;
    transition: var(--transition);
    border-radius: 50px;
    /* Pill shape */
}

.btn:hover {
    background: var(--accent-primary);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(190, 24, 93, 0.3);
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--text-light);
    border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* --- HEADER --- */
header {
    height: var(--header-height);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(251, 207, 232, 0.3);
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* --- NAVIGATION --- */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    position: relative;
}

.logo {
    font-family: var(--font-heading);
    color: var(--text-main);
    text-transform: uppercase;
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align right */
    justify-content: center;
}

.logo-main {
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 0.9rem;
    /* 50% smaller */
    letter-spacing: 2px;
    margin-top: -2px;
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-icons {
    display: flex;
    display: flex;
    align-items: center;
    position: relative;
    /* Context for absolute search box */
    height: 40px;
    /* Initial fixed height for alignment */
}

/* Group of Icons (Default State) */
.nav-icon-group {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    visibility: visible;
}

/* Hidden State (When searching) */
.nav-icons.search-active .nav-icon-group {
    opacity: 0;
    visibility: hidden;
    /* position: absolute; REMOVED to prevent layout shift */
    pointer-events: none;
}

/* Inline Expanding Search Box */
.search-box-inline {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    background: white;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    white-space: nowrap;
    z-index: 10;
}

/* Active State (Expanded) */
.nav-icons.search-active .search-box-inline {
    width: 300px;
    /* Desktop Width */
    padding-left: 10px;
}

.search-input-inline {
    width: 100%;
    border: none;
    border-bottom: 2px solid #eee;
    padding: 8px 0;
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    background: transparent;
}

.search-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    padding: 0 0 0 10px;
    margin-left: 5px;
}

.search-close-btn:hover {
    color: var(--accent-primary);
}

.nav-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-main);
    padding: 0;
    transition: var(--transition);
}

.nav-icon-btn:hover,
.nav-icon-group a:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.nav-icon-group a {
    font-size: 1.2rem;
    color: var(--text-main);
}

/* Mobile Responsiveness for Search */
@media (max-width: 600px) {
    .nav-icons.search-active .search-box-inline {
        width: 100%;
        /* Full width on mobile */
        position: fixed;
        /* Overlay header */
        top: 0;
        left: 0;
        right: 0;
        height: var(--header-height);
        padding: 0 1rem;
        background: white;
        transform: none;
        display: flex;
        align-items: center;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }
}

/* --- HERO SECTION (Background Image + Fixed) --- */
.hero {
    height: 550px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--text-main);
    background-color: #fff;
}

/* Hero Overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Low opacity color overlay (Pink/Purple tint) */
    background: linear-gradient(135deg, rgba(80, 7, 36, 0.5), rgba(190, 24, 93, 0.3));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: white;
    padding: 2rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.95;
}

.hero .btn {
    border-color: white;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.hero .btn:hover {
    background: white;
    color: var(--accent-primary);
    border-color: white;
}

/* --- CATEGORIES --- */
.categories {
    padding: var(--spacing-md);
    /* Reduced from lg */
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    /* Tighter gap */
}

.category-card {
    position: relative;
    height: 380px;
    /* Compact height */
    overflow: hidden;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.category-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.category-card:hover .category-img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: var(--transition);
}

.category-card:hover .category-overlay {
    padding-bottom: 3rem;
    /* Slide up effect */
    background: linear-gradient(to top, rgba(190, 24, 93, 0.6), transparent);
    /* Pink tint on hover */
}

.category-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.category-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    border-bottom: 1px solid white;
    padding-bottom: 3px;
}

/* --- PRODUCTS --- */
.products-section {
    padding: 3rem 0;
    /* Reduced from 5rem */
    background: var(--bg-body);
}

.bg-soft {
    background-color: var(--bg-soft);
}

/* Pink background section */

.product-grid {
    display: grid;
    /* Increased min-width for larger cards, reduced gap */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

#bestSellers .product-card,
#newArrivals .product-card {
    margin: 0 10px;
    /* Added left and right margin for index.php sections */
}

.product-card {
    background: var(--bg-card);
    border-radius: 4px;
    /* Flatter radius for modern look */
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #f0f0f0;
    /* Very subtle border */
    /* Much cleaner without heavy box shadow initially */
}

.product-card:hover {
    transform: translateY(-2px);
    /* Subtle lift */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Soft shadow like modern e-commerce */
    border-color: #e0e0e0;
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f0f0f0;
}

.product-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.6s ease;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.add-to-cart-btn {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translate(-50%, 20px);
    width: 90%;
    padding: 12px;
    background: white;
    color: var(--text-main);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.add-to-cart-btn:hover {
    background: var(--accent-primary);
    color: white;
}

.product-card:hover .add-to-cart-btn {
    opacity: 1;
    transform: translate(-50%, 0);
}

.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    background: var(--accent-primary);
    color: white;
    padding: 5px 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 2px;
}

.product-info {
    padding: 1rem 0.5rem;
    /* Tighter padding, side padding for subtle breathing room */
    text-align: left;
    /* Left align is standard for modern e-commerce */
}

.product-name {
    font-size: 0.95rem;
    /* Slightly smaller for cleaner look */
    font-weight: 400;
    /* Less bold, more elegant */
    margin-bottom: 0.4rem;
    color: var(--text-main);
    line-height: 1.3;
}

.product-price {
    font-size: 1.1rem;
    color: var(--text-heading);
    /* Darker, less "shouty" price color */
    font-weight: 700;
    font-family: var(--font-body);
    /* Standard sans-serif for numbers */
}

/* --- PROMO BANNER (With Background Image) --- */
.promo-banner {
    position: relative;
    padding: 5rem 0;
    /* Compact */
    text-align: center;
    margin: 3rem 0;
    /* Reduced margin */
    /* New Background Image: Wedding/Silk texture */
    background-image: url('../../camera/banner6.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
}

/* --- HERO SECTION --- */
.hero {
    height: 550px;
    width: 100%;
    position: relative;
    /* Hero section is now more flexible. Content alignment moved to internal containers. */
    overflow: hidden;
    /* Ensure slides don't overflow */
    color: white;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Add a subtle overlay to ensure text readability while preserving image colors */
.hero-slider::after {
    display: none;
    /* Let the image breathe more, or use very subtle gradient */
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 600px;
    padding: 3rem 0;
    margin-left: 5%;
    /* Align to the left area */
    text-align: left;
    color: #2e2e2e;
    /* Darker text for readability if overlay is light */
}

.hero-brand {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    /* Slightly smaller for elegance */
    margin-bottom: 2rem;
    opacity: 0.8;
    letter-spacing: 2px;
    color: #4b5563;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 4.5rem;
    /* Larger and more impactful like the design */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    color: #2e2e2e;
    font-weight: 400;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    font-weight: 300;
    opacity: 0.9;
    color: #2e2e2e;
}

/* Designed to match the 'Shop Now' button in the reference */
.hero .btn-primary {
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 2px;
    /* Rectangular like the design */
    padding: 16px 40px;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.hero .btn-primary:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Promo Overlay */
.promo-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Pinkish-Dark Overlay */
    background: rgba(46, 46, 46, 0.6);
    z-index: 1;
}

.promo-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    margin: 0 auto;
}

.promo-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffc2e3;
    /* Light pink text for contrast */
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.promo-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.promo-desc {
    color: #f0f0f0;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* --- NEWSLETTER --- */
.newsletter {
    padding: 5rem 0;
    text-align: center;
    background: url('https://www.transparenttextures.com/patterns/cubes.png'), var(--bg-soft);
}

.newsletter h3 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

.newsletter-form {
    display: flex;
    max-width: 400px;
    margin: 2rem auto 1rem;
    position: relative;
}

.newsletter-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid var(--text-main);
    padding: 15px 5px;
    font-size: 1rem;
    background: transparent;
    outline: none;
    font-family: var(--font-body);
}

.newsletter-input:focus {
    border-color: var(--accent-primary);
}

.newsletter-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-main);
    transition: 0.3s;
}

.newsletter-btn:hover {
    color: var(--accent-primary);
}

/* --- FOOTER --- */
footer {
    background: var(--bg-footer);
    color: white;
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 1.8rem;
    color: var(--accent-light);
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #a3a3a3;
    font-size: 0.95rem;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--accent-light);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links i {
    font-size: 1.4rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 50%;
    transition: 0.3s;
}

.social-links i:hover {
    background: var(--accent-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 0.85rem;
}

/* --- TOAST --- */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-primary);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(190, 24, 93, 0.4);
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 968px) {
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        height: 60vh;
        min-height: 450px;
    }

    .hero-slide {
        background-position: top center;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .logo-main {
        font-size: 1.6rem;
    }

    .logo-sub {
        font-size: 0.8rem;
    }

    /* --- TABLET & MOBILE NAVIGATION --- */
    .nav-icons {
        gap: 1rem;
    }

    .hamburger {
        display: block !important;
        /* Visible on Tablet/Mobile */
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 3rem 0;
        gap: 2rem;
        transform: translateY(-150%);
        transition: transform 0.4s ease;
        z-index: 900;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    /* --- MOBILE SPECIFIC STYLES --- */

    .hero {
        height: 50vh;
        min-height: 350px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .logo {
        flex-shrink: 1;
    }

    .logo-main {
        font-size: 1.4rem;
    }

    .logo-sub {
        font-size: 0.7rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .newsletter-form {
        max-width: 100%;
    }
}

/* --- AUTH & FORM STYLES --- */
.auth-container {
    max-width: 450px;
    margin: 4rem auto;
    padding: 3rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    text-align: center;
    border: 1px solid #eee;
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-heading);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;

    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: 0.3s;
    background: #fdfdfd;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.1);
    background: white;
}

.auth-links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-links a {
    color: var(--accent-primary);
    font-weight: 600;
}

/* --- CART & UTILITIES --- */
.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #e5e5e5;
    border-radius: var(--radius-sm);
    width: fit-content;
    overflow: hidden;
}

.qty-btn {
    background: #f9f9f9;
    border: none;
    padding: 8px 12px;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-main);
    transition: 0.2s;
}

.qty-btn:hover {
    background: #eee;
    color: var(--accent-primary);
}

.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-heading);
}

/* Ensure buttons in cart align properly */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.cart-item-row td {
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.cart-item-row:last-child td {
    border-bottom: none;
}

/* --- SHOP PAGE (Redesigned) --- */
.page-header {
    background: var(--bg-soft);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 4rem;
}

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: start;
}

.shop-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    /* Clean look: no border, just spacing */
}

.filter-group {
    margin-bottom: 2.5rem;
}

.filter-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Custom Checkbox Styling (No HTML changes needed) */
.filter-checkbox {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

.filter-checkbox:hover {
    color: var(--accent-primary);
}

.filter-checkbox input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #d1d1d1;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
    background: white;
}

.filter-checkbox input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.filter-checkbox input:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.result-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sort-dropdown {
    padding: 8px 16px;
    border: 1px solid #e5e5e5;
    border-radius: var(--radius-sm);
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: 0.3s;
}

.sort-dropdown:hover {
    border-color: var(--accent-primary);
}

/* Load More Button - Make it outlined and centered */
.product-grid+div {
    margin-top: 4rem;
    text-align: center;
}

.product-grid+div .btn {
    border: 1px solid var(--text-main);
    color: var(--text-main);
    background: transparent;
    padding: 12px 40px;
    transition: 0.3s;
}

.product-grid+div .btn:hover {
    background: var(--text-main);
    color: white;
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Sticky Sidebar */
    .shop-sidebar {
        position: sticky;
        top: calc(var(--header-height) + 2rem);
        height: fit-content;
        background: white;
        padding: 1.5rem;
        border: 1px solid #f0f0f0;
        border-radius: var(--radius-sm);
        z-index: 10;
        max-height: 80vh;
        overflow-y: auto;
    }


}

@media (max-width: 900px) {
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Mobile Filters - Accordion Style (Simple) */
    #mobileFilterBtn {
        display: flex !important;
        /* Show on mobile */
    }

    .shop-sidebar {
        position: relative;
        top: 0;
        padding: 1rem;
        margin-bottom: 2rem;
        border: 1px solid #eee;
        background: #fafafa;
        display: none;
        /* Hidden by default on mobile */
    }

    .shop-sidebar.active {
        display: block;
        /* Show when active */
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Mobile Grid - 2 Column for Professional Look */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }

    .product-info {
        padding: 0.8rem 0.5rem;
    }

    .product-name {
        font-size: 0.95rem;
    }
}

/* --- ACCOUNT PAGES --- */
.account-layout {
    display: flex;
    gap: 3rem;
    min-height: 50vh;
}

.account-sidebar {
    width: 250px;
    flex-shrink: 0;
}

.account-sidebar-box {
    background: var(--bg-soft);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* User summary inside sidebar */
.user-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(190, 24, 93, 0.15);
}

.user-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    font-family: var(--font-heading);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(190, 24, 93, 0.3);
}

.user-info .name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.3;
}

.user-info .email {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    margin-top: 2px;
}

/* Nav links */
.account-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.account-nav a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.account-nav a:hover {
    background: rgba(190, 24, 93, 0.06);
    color: var(--accent-primary);
    border-left-color: rgba(190, 24, 93, 0.3);
    padding-left: 1.15rem;
}

.account-nav a.active {
    background: rgba(190, 24, 93, 0.1);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    font-weight: 600;
}

.account-content {
    flex: 1;
    width: 100%;
}

@media (max-width: 768px) {
    .account-layout {
        flex-direction: column;
        gap: 1.5rem;
    }

    .account-sidebar {
        width: 100%;
    }

    .account-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        gap: 0.4rem;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .account-nav::-webkit-scrollbar {
        display: none;
    }

    .account-nav a {
        white-space: nowrap;
        flex-shrink: 0;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 6px 6px 0 0;
        padding: 0.6rem 1rem;
    }

    .account-nav a:hover {
        border-left-color: transparent;
        border-bottom-color: rgba(190, 24, 93, 0.3);
        padding-left: 1rem;
    }

    .account-nav a.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent-primary);
    }

    .account-nav li {
        white-space: nowrap;
    }
}

/* --- ORDER HISTORY --- */
.order-card {
    border: 1px solid #eee;
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    background: white;
    transition: var(--transition);
}

.order-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border-color: #fce7f3;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-info-group {
    display: flex;
    flex-direction: column;
}

.order-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.order-value {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.order-items {
    display: flex;
    gap: 1.5rem;
}

.order-img-box {
    width: 80px;
    height: 100px;
    background: #f4f4f4;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.order-item-details {
    display: flex;
    flex-direction: column;
}

.order-item-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.order-item-meta {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.order-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e6fffa;
    color: #2c7a7b;
    font-size: 0.75rem;
    border-radius: 50px;
    font-weight: 700;
}

@media (max-width: 600px) {
    .order-header {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .order-header>div:last-child {
        grid-column: span 2;
        padding-top: 0.5rem;
        border-top: 1px dashed #eee;
    }

    .order-items {
        gap: 1rem;
    }
}

/* --- GENERIC PAGE LAYOUTS (Cart & Checkout) --- */
.page-layout-2col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

/* Responsive adjustments for layouts */
@media (max-width: 900px) {
    .page-layout-2col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-row-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 600px) {

    /* Hide Table Headers */
    .cart-table-wrapper thead {
        display: none;
    }

    /* Reset Table Width to prevent overflow */
    .cart-table-wrapper table,
    .cart-table-wrapper tbody {
        display: block;
        width: 100%;
        min-width: 0 !important;
        /* Override inline style from cart.php */
    }

    /* Make Rows into Professional Cards */
    .cart-table-wrapper tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 1rem;
        margin-bottom: 1.5rem;
        border: none;
        border-radius: var(--radius-md);
        padding: 1.25rem;
        background: white;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
        /* Premium shadow */
        position: relative;
    }

    .cart-table-wrapper td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        /* Clean look */
        width: auto;
        /* Let grid handle width */
        font-size: 0.95rem;
    }

    /* Product Info (Image + Title) - Spans full width at top */
    .cart-table-wrapper td:first-child {
        grid-column: 1 / -1;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 1rem;
        margin-bottom: 0.5rem;
        justify-content: flex-start;
    }

    /* Price Cell */
    .cart-table-wrapper td:nth-of-type(2) {
        grid-column: 1 / 2;
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.9rem;
        color: var(--text-muted);
    }

    .cart-table-wrapper td:nth-of-type(2)::before {
        content: "Price";
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 2px;
    }

    /* Quantity Cell */
    .cart-table-wrapper td:nth-of-type(3) {
        grid-column: 2 / 3;
        grid-row: span 2;
        /* Take up height of Price + Total */
        justify-content: flex-end;
        align-items: center;
    }

    .cart-table-wrapper td:nth-of-type(3)::before {
        display: none;
        /* Hide label for cleaner look, button is obvious */
    }

    /* Total Cell */
    .cart-table-wrapper td:nth-of-type(4) {
        grid-column: 1 / 2;
        flex-direction: column;
        align-items: flex-start;
        font-weight: 700;
        color: var(--accent-primary);
    }

    .cart-table-wrapper td:nth-of-type(4)::before {
        content: "Total";
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-muted);
        font-weight: 400;
        margin-bottom: 2px;
    }

    /* Remove Button */
    .cart-table-wrapper td:last-child {
        position: absolute;
        top: 1rem;
        right: 1rem;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff5f8;
        /* Soft pink background */
        border-radius: 50%;
        color: var(--accent-primary);
    }

    /* Override script inline styles if necessary */
    .cart-table-wrapper td img {
        width: 70px !important;
        height: 90px !important;
        object-fit: cover;
    }
}

/* --- PRODUCT DETAIL PAGE --- */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 4rem;
}

.gallery-main {
    background: #f9f9f9;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-main:hover img {
    transform: scale(1.05);
    /* Zoom effect */
}

/* Info Side */
.p-detail-info h1 {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.p-price-lg {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.variant-group {
    margin-bottom: 2rem;
}

.variant-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* Size Selector */
.size-selector {
    display: flex;
    gap: 0.8rem;
}

.size-btn {
    width: 45px;
    height: 45px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Circular */
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
}

.size-btn:hover,
.size-btn.active {
    border-color: var(--text-main);
    background: var(--text-main);
    color: white;
}

/* Color Selector */
.color-selector {
    display: flex;
    gap: 0.8rem;
}

.color-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.color-btn.active::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    bottom: -4px;
    left: -4px;
    border: 1px solid var(--text-main);
    border-radius: 50%;
}

.color-btn:hover {
    transform: scale(1.1);
}

/* Quantity Selector (Reuse exist styles but ensure layout) */
.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    width: fit-content;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-main);
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    outline: none;
}

/* Responsive Detail */
@media (max-width: 900px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .p-detail-info h1 {
        font-size: 2rem;
    }
}

/* --- UTILITIES FOR GRAY BACKGROUND --- */
@media (min-width: 901px) {

    .cart-table-wrapper,
    .checkout-form-box {
        background: white;
        padding: 2.5rem;
        border-radius: var(--radius-sm);
        border: 1px solid #eee;
        box-shadow: var(--shadow-sm);
    }
}

/* Ensure account content has white background */
.account-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-sm);
    border: 1px solid #eee;
    box-shadow: var(--shadow-sm);
}

/* Force hide hamburger on desktop */
@media (min-width: 969px) {
    .hamburger {
        display: none !important;
    }
}

/* --- HERO RESPONSIVENESS --- */
@media (max-width: 1024px) {
    .hero {
        height: auto;
        aspect-ratio: 16 / 7;
        /* Preserve wide aspect on tablets */
        min-height: auto;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        aspect-ratio: 16 / 7;
        /* Kept wide horizontal as requested */
        min-height: auto;
    }

    .hero-content {
        position: absolute;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        margin-left: 0;
        text-align: center;
        padding: 1rem;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .hero-brand {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        max-width: 90%;
    }

    .hero .btn-primary {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .hero-slider::after {
        display: block;
        background: rgba(0, 0, 0, 0.3);
        /* Add subtle overlay for better text contrast on mobile */
    }
}

@media (max-width: 480px) {
    .hero {
        aspect-ratio: 16 / 7;
        /* Kept strictly horizontal */
        min-height: auto;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .hero p {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .hero .btn-primary {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
}

/* ── Mobile Product Grid (2 Columns) ── */
@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        /* Tighter gap for mobile */
    }
}