/* ======================================
   YASHASVI WONDERS - Global Stylesheet
   Inspired by sirigold.net layout
   ====================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Lato:wght@300;400;700;900&display=swap');

/* --- CSS Variables --- */
:root {
    --primary-maroon: #690000;
    --primary-maroon-dark: #4a0000;
    --accent-gold: #FEEC62;
    --accent-gold-dark: #e6d456;
    --success-green: #10b374;
    --success-green-dark: #0d9960;
    --white: #ffffff;
    --off-white: #f9f9f9;
    --light-gray: #f1f1f1;
    --border-gray: #e0e0e0;
    --text-dark: #222222;
    --text-medium: #555555;
    --text-light: #999999;
    --footer-bg: #1a1a2e;
    --footer-text: #cccccc;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Lato', 'Segoe UI', sans-serif;
    --danger: #e74c3c;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header Top Bar --- */
.header-top-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border-gray);
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-medium);
}

.header-top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top-bar .contact-info a {
    color: var(--text-medium);
    margin-right: 20px;
}

.header-top-bar .contact-info a:hover {
    color: var(--primary-maroon);
}

.header-top-bar .contact-info i {
    margin-right: 5px;
}

/* --- Header Logo Area --- */
.header-logo-area {
    background: var(--white);
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-gray);
}

.header-logo-area .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo-area .logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

/* --- Main Navigation --- */
.main-nav {
    background: var(--primary-maroon);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.main-nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    padding: 14px 20px;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.3s ease;
}

.nav-menu li a:hover {
    background: rgba(255,255,255,0.1);
}

.nav-menu li.active a {
    background: rgba(255,255,255,0.15);
}

/* Dropdown */
.nav-menu li .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--border-gray);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: none;
    z-index: 999;
}

.nav-menu li:hover .sub-menu {
    display: block;
}

.nav-menu li .sub-menu li a {
    color: var(--text-dark);
    padding: 10px 18px;
    font-size: 13px;
    text-transform: none;
    border-bottom: 1px solid var(--light-gray);
}

.nav-menu li .sub-menu li a:hover {
    background: var(--light-gray);
    color: var(--primary-maroon);
}

/* Nav Buttons (Login/Register) */
.nav-btn a {
    background: var(--accent-gold) !important;
    color: var(--text-dark) !important;
    border-radius: 6px;
    margin: 6px 4px;
    padding: 8px 18px !important;
    font-weight: 700 !important;
}

.nav-btn a:hover {
    background: var(--accent-gold-dark) !important;
}

/* --- Mobile Navigation --- */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 5px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-header {
    display: none;
}

/* --- Marquee / Info Bar --- */
.info-marquee {
    background: var(--accent-gold);
    padding: 8px 0;
    overflow: hidden;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-maroon);
}

.info-marquee .marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 25s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* --- Hero Banner / Slider --- */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a2e 0%, #1a1a3e 100%);
}

.hero-slider {
    position: relative;
    width: 100%;
    min-height: 500px;
}

.hero-slide {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 40px 20px;
}

.hero-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.hero-overlay h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 15px;
    text-shadow: 2px 3px 6px rgba(0,0,0,0.4);
}

.hero-overlay p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin-bottom: 25px;
}

.hero-overlay .btn-hero {
    background: var(--accent-gold);
    color: var(--text-dark);
    padding: 12px 35px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.hero-overlay .btn-hero:hover {
    background: var(--accent-gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(254,236,98,0.3);
}

/* --- Section Titles --- */
.section-title {
    text-align: center;
    margin: 50px 0 35px;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-maroon);
}

/* --- Featured Categories --- */
.categories-section {
    padding: 30px 0 50px;
    background: var(--off-white);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.category-box {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
}

.category-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: var(--primary-maroon);
}

.category-box .cat-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.category-box .cat-name {
    background: var(--primary-maroon);
    padding: 12px;
    margin: 0;
}

.category-box .cat-name h4 {
    color: var(--accent-gold);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* --- Products Section --- */
.products-section {
    padding: 30px 0 60px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    padding: 15px;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--success-green);
    box-shadow: 0 5px 20px rgba(16,179,116,0.15);
    transform: translateY(-3px);
}

.product-card .product-img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 12px;
    border-radius: 6px;
}

.product-card .product-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--success-green);
    margin-bottom: 10px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .product-title a {
    color: var(--success-green);
}

.product-card .product-title a:hover {
    color: var(--success-green-dark);
}

.product-card .price-line {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 3px;
}

.product-card .price-line.tax {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.82rem;
    margin-bottom: 12px;
}

.product-card .btn-view {
    display: inline-block;
    background: var(--success-green);
    color: var(--white);
    padding: 8px 22px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.product-card .btn-view:hover {
    background: var(--success-green-dark);
    transform: translateY(-1px);
}

/* --- Product Detail Page --- */
.page-header {
    background: var(--off-white);
    border-bottom: 1px solid var(--border-gray);
    padding: 20px 0;
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-medium);
}

.breadcrumb a {
    color: var(--primary-maroon);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
    color: var(--text-light);
}

/* Products listing page with sidebar */
.products-page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 40px 0;
}

.sidebar {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    padding: 20px;
    align-self: start;
    position: sticky;
    top: 80px;
}

.sidebar h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-maroon);
    color: var(--text-dark);
}

.sidebar .search-box {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    outline: none;
    font-family: var(--font-body);
}

.sidebar .search-box:focus {
    border-color: var(--primary-maroon);
}

.sidebar .cat-list li {
    margin-bottom: 8px;
}

.sidebar .cat-list li a {
    display: block;
    padding: 10px 15px;
    background: var(--accent-gold);
    color: var(--text-dark);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sidebar .cat-list li a:hover,
.sidebar .cat-list li a.active {
    background: var(--primary-maroon);
    color: var(--white);
}

/* --- Forms (Login / Register) --- */
.form-section {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--off-white);
}

.form-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.12);
}

.form-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-maroon);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-maroon);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    outline: none;
    background: var(--white);
    color: #111;
}

.form-control:focus {
    border-color: var(--primary-maroon);
    box-shadow: 0 0 10px rgba(105,0,0,0.15);
    background: #fff;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-body);
    text-align: center;
}

.btn-primary {
    background: var(--primary-maroon);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-maroon-dark);
    transform: translateY(-1px);
}

.btn-gold {
    background: var(--accent-gold);
    color: var(--text-dark);
}

.btn-gold:hover {
    background: var(--accent-gold-dark);
}

.btn-success {
    background: var(--success-green);
    color: var(--white);
}

.btn-success:hover {
    background: var(--success-green-dark);
}

.btn-block {
    display: block;
    width: 100%;
}

.form-message {
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
    font-size: 14px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-medium);
}

.form-footer a {
    color: var(--primary-maroon);
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* --- Dashboard --- */
.dashboard-section {
    padding: 40px 0;
    min-height: 60vh;
}

.dashboard-welcome {
    background: linear-gradient(135deg, var(--primary-maroon), var(--primary-maroon-dark));
    color: var(--white);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.dashboard-welcome h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 8px;
}

.dashboard-welcome p {
    opacity: 0.9;
}

.referral-card {
    background: var(--white);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
}

.referral-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.referral-code {
    display: inline-block;
    background: var(--light-gray);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 3px;
    padding: 12px 30px;
    border-radius: 8px;
    color: var(--primary-maroon);
    border: 2px dashed var(--primary-maroon);
    margin-bottom: 15px;
}

.referral-note {
    background: #fff8e1;
    border-left: 4px solid var(--accent-gold);
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-medium);
    margin-top: 15px;
}

/* --- Stats Grid (Admin) --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-maroon);
    margin-bottom: 5px;
}

.stat-card p {
    color: var(--text-medium);
    font-size: 14px;
}

/* --- Admin Table --- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.admin-table th {
    background: var(--primary-maroon);
    color: var(--white);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.admin-table td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-gray);
    color: var(--text-dark);
}

.admin-table tr:nth-child(even) {
    background: var(--off-white);
}

.admin-table tr:hover {
    background: #f5f5f5;
}

/* --- Footer --- */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 50px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    padding-bottom: 35px;
}

.footer-col h4 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-maroon);
    display: inline-block;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--footer-text);
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--footer-text);
}

.footer-logo {
    height: 60px;
    margin-bottom: 15px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    transition: all 0.3s ease;
    font-size: 16px;
}

.footer-social a:hover {
    background: var(--accent-gold);
    color: var(--text-dark);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.footer-bottom a {
    color: rgba(255,255,255,0.3);
    font-size: 10px;
}

/* --- About Page --- */
.about-section {
    padding: 50px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-maroon);
    margin-bottom: 15px;
}

.about-text p {
    color: var(--text-medium);
    margin-bottom: 15px;
    line-height: 1.8;
}

/* --- Contact Page --- */
.contact-section {
    padding: 50px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-card {
    background: var(--off-white);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-gray);
}

.contact-info-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-maroon);
    margin-bottom: 20px;
}

.contact-info-card .info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.contact-info-card .info-item i {
    font-size: 18px;
    color: var(--primary-maroon);
    margin-top: 3px;
}

.contact-form .form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-maroon { color: var(--primary-maroon); }
.text-green { color: var(--success-green); }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }

/* --- Admin Overlay --- */
.admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26,26,46,0.98);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-overlay .form-card {
    max-width: 400px;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .header-top-bar {
        display: none;
    }
    
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
        background: var(--white);
        border-bottom: 1px solid var(--border-gray);
    }
    
    .mobile-header .logo-img {
        height: 45px;
    }
    
    .mobile-header .mobile-btns a {
        padding: 6px 14px;
        font-size: 12px;
        border-radius: 5px;
        font-weight: 600;
        margin-left: 6px;
    }
    
    .mobile-header .mobile-btns .btn-login {
        background: var(--primary-maroon);
        color: var(--white);
    }
    
    .mobile-header .mobile-btns .btn-register {
        background: var(--accent-gold);
        color: var(--text-dark);
    }
    
    .header-logo-area {
        display: none;
    }
    
    .main-nav .container {
        justify-content: space-between;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100%;
        background: var(--primary-maroon);
        flex-direction: column;
        padding-top: 60px;
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li a {
        padding: 12px 25px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-menu li .sub-menu {
        position: static;
        box-shadow: none;
        background: rgba(0,0,0,0.2);
        display: none;
    }
    
    .nav-menu li:hover .sub-menu {
        display: block;
    }
    
    .nav-menu li .sub-menu li a {
        color: var(--white);
        border-bottom-color: rgba(255,255,255,0.05);
        padding-left: 40px;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .nav-btn a {
        margin: 5px 25px !important;
        display: block;
        text-align: center;
    }
    
    .hero-slide img {
        height: 300px;
    }
    
    .hero-overlay h1 {
        font-size: 1.8rem;
    }
    
    .hero-overlay p {
        font-size: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-page-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        padding: 10px;
    }
    
    .product-card .product-img {
        height: 120px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .form-card {
        padding: 25px;
    }
    .registration-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Nav Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.nav-overlay.active {
    display: block;
}
