/* General Styles & Variables */
:root {
    --primary-color: #f37021;
    --primary-light: #fff3eb;
    --text-main: #2c2c2c;
    --text-light: #666;
    --bg-light: #f9f9f9;
    --border-color: #eee;
    --white: #ffffff;
    --black: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: #d86016;
}

/* Base Visibility Classes */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
}
.mobile-bottom-nav {
    display: none;
}

/* --- Top Bar --- */
.top-bar {
    background-color: #fff9f5;
    color: var(--text-main);
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
}
.top-bar-content span i {
    margin-right: 5px;
}

/* --- Main Header --- */
.main-header {
    padding-top: 15px;
    /* Removed padding-bottom so nav sits flush with banner */
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 15px;
}
.logo h1 {
    font-size: 28px;
    color: var(--text-main);
    font-weight: 700;
}
.logo h1 span {
    color: var(--primary-color);
}
.logo p {
    font-size: 11px;
    color: var(--text-light);
}

.search-bar form {
    display: flex;
    width: 500px;
}
.search-input-wrapper {
    position: relative;
    width: 100%;
}
.search-input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    background-color: var(--bg-light);
}
.search-input-wrapper .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.header-actions {
    display: flex;
    gap: 25px;
    align-items: center;
}
.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    color: var(--text-main);
}
.action-item i {
    font-size: 20px;
    margin-bottom: 5px;
}
.icon-wrapper {
    position: relative;
}
.badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--primary-color);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
}

/* --- Navigation --- */
.main-nav {
    border-bottom: 1px solid var(--border-color);
}
.nav-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 15px 0;
    font-size: 14px;
    font-weight: 500;
}
.nav-links a:hover {
    color: var(--primary-color);
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, #fff5ec 0%, #fde0cd 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hero-content {
    flex: 1;
    z-index: 2;
}
.hero-content .subtitle {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.hero-content h2 {
    font-size: 56px;
    line-height: 1.1;
    margin: 15px 0;
    color: var(--text-main);
}
.hero-content h2 span {
    font-family: 'Brush Script MT', cursive;
    color: var(--primary-color);
    font-weight: normal;
    font-size: 64px;
}
.hero-content p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 400px;
}
.hero-buttons {
    display: flex;
    gap: 15px;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
}
.hero-image-area {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.discount-badge {
    position: absolute;
    top: 20px;
    left: 0;
    background: white;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    color: var(--primary-color);
    font-weight: bold;
    border: 3px solid var(--primary-color);
    z-index: 5;
}
.discount-badge span:nth-child(1) { font-size: 12px; }
.discount-badge span:nth-child(2) { font-size: 36px; line-height: 1; }
.discount-badge span:nth-child(3) { font-size: 14px; }
.hero-model {
    max-height: 100%;
    z-index: 1;
}

/* --- Section Titles --- */
.section-title {
    font-size: 22px;
    font-weight: 700;
    margin: 40px 0 20px;
}

/* --- Shop by Category --- */
.category-list {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 40px;
}
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.category-circle {
    width: 100px;
    height: 100px;
    background-color: var(--primary-light);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.category-circle img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
}
.category-item span {
    font-size: 14px;
    font-weight: 500;
}

/* --- Product Cards --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    position: relative;
    transition: box-shadow 0.3s;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.discount-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff4747;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
}
.product-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}
.product-brand {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    text-align: left;
    margin-bottom: 5px;
}
.product-title {
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    margin-bottom: 10px;
    height: 40px; 
    overflow: hidden;
}
.product-price {
    text-align: left;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
}
.product-price del {
    color: var(--text-light);
    font-weight: normal;
    font-size: 13px;
    margin-left: 5px;
}
.product-rating {
    text-align: left;
    font-size: 12px;
    color: #f39c12;
    margin-bottom: 15px;
}
.add-to-cart-btn {
    width: 100%;
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: auto;
    display: block;
    text-align: center;
    text-decoration: none;
}
.add-to-cart-btn:hover {
    background: #d86016;
}

/* Flash Sale Timer block */
.flash-sale-info {
    border: 1px solid #fff5ec;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #fffaf7;
}
.flash-sale-info h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.timer {
    display: flex;
    gap: 10px;
}
.time-box {
    background: #ffebd9;
    color: var(--primary-color);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 20px;
    font-weight: bold;
    position: relative;
}

/* --- USPs Section --- */
.usps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    background: #fffdfb;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}
.usp-item {
    display: flex;
    align-items: center;
    gap: 15px;
}
.usp-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* --- Brands --- */
.brands-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}
.brand-logo {
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 5px;
    width: 150px;
    text-align: center;
    flex: 0 0 auto;
}

/* --- Testimonials --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}
.testimonial-card {
    background: #fdfbf9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

/* --- Footer --- */
.newsletter-section {
    background-color: #fff9f5;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.newsletter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 30px;
    padding: 50px 0;
}
.footer-logo h2 span { color: var(--primary-color); }
.footer-bottom {
    background-color: var(--bg-light);
    color: var(--text-light);
    text-align: center;
    padding: 15px 0;
    font-size: 13px;
}



/* --- Auth Pages --- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background-color: var(--bg-light);
    min-height: calc(100vh - 400px); /* Adjust based on header/footer */
}

.auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 450px;
    border: 1px solid var(--border-color);
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    text-align: center;
    color: var(--text-main);
}

.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s;
    background-color: var(--white);
}

.form-control:focus {
    border-color: var(--primary-color);
}

.remember-me {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.remember-me label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    cursor: pointer;
    font-weight: normal;
}

.forgot-password {
    color: var(--primary-color);
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 10px;
}

.auth-redirect {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.auth-redirect a {
    color: var(--primary-color);
    font-weight: 600;
}

.auth-redirect a:hover {
    text-decoration: underline;
}

.text-danger {
    color: #ff4747;
    font-size: 13px;
    list-style: none;
    padding-left: 0;
}


/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--text-main);
}

/* --- Mobile Responsive Rules --- */
@media (max-width: 768px) {
    /* Base Display */
    .desktop-only { display: none !important; }
    
    body {
        padding-bottom: 70px; /* Space for bottom nav */
    }

    /* Top Bar */
    .top-bar-content {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        gap: 15px;
        padding-bottom: 5px;
    }
    
    /* Main Header Structure */
    .main-header {
        padding: 10px 0;
        position: sticky;
        top: 0;
        background: white;
        z-index: 100;
    }
    .header-container {
        display: grid;
        grid-template-columns: 40px 1fr auto;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }
    .mobile-menu-btn {
        display: block;
    }
    .logo {
        text-align: center;
    }
    .logo h1 {
        font-size: 22px;
    }
    .header-actions {
        gap: 15px;
    }
    .header-actions .action-item i {
        font-size: 22px;
        margin-bottom: 0;
    }
    .header-actions .badge {
        top: -8px;
        right: -8px;
    }

    /* Mobile Search Bar below logo */
    .search-bar {
        grid-column: 1 / -1;
    }
    .search-bar form {
        width: 100%;
    }

    /* Hero Section */
    .hero-section {
        padding: 20px 0 0;
    }
    .hero-container {
        flex-direction: column;
    }
    .hero-content {
        text-align: center;
        margin-bottom: 20px;
        padding: 0 15px;
    }
    .hero-content h2 {
        font-size: 32px;
    }
    .hero-content h2 span {
        font-size: 40px;
    }
    .hero-image-area {
        height: auto;
        width: 100%;
    }
    .hero-model {
        width: 100%;
        border-radius: 20px 20px 0 0 !important;
    }
    .discount-badge {
        width: 90px;
        height: 90px;
        top: 10px;
        right: 10px;
        left: auto;
    }

    /* Horizontal Scrolling for Grids */
    .category-list, .product-grid, .brands-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding-bottom: 15px;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hide scrollbar for clean look */
    .category-list::-webkit-scrollbar,
    .product-grid::-webkit-scrollbar,
    .brands-row::-webkit-scrollbar {
        display: none;
    }
    
    .category-item, .product-card, .brand-logo {
        scroll-snap-align: start;
    }

    /* Set specific widths for horizontal scroll items */
    .category-item { width: 80px; }
    .category-circle { width: 80px; height: 80px; border-radius: 12px; }
    
    .product-card {
        flex: 0 0 200px; /* Fixed width for mobile product cards */
    }

    /* Flash Sale timer */
    .flash-sale-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        margin-bottom: 15px;
    }
    .flash-sale-info h3 { margin-bottom: 0; font-size: 16px; }

    /* USPs */
    .usps-grid {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding: 15px;
    }
    .usp-item {
        flex: 0 0 200px;
    }

    /* Mobile Bottom Navigation Bar */
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: white;
        border-top: 1px solid var(--border-color);
        padding: 10px 0;
        z-index: 1000;
    }
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 11px;
        color: var(--text-light);
        gap: 4px;
    }
    .bottom-nav-item.active {
        color: var(--primary-color);
    }
    .bottom-nav-item i {
        font-size: 20px;
    }
}
