/* Minimalist CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
:root {
    --primary-color: #1A365D;
    --primary-dark: #0f2540;
    --secondary-color: #D1A16C;
    --accent-color: #FF8F00;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-color: #E6ECF1;
    --dark-color: #0f172a;
    --gray-100: #E6ECF1;
    --gray-200: #d1d8e0;
    --gray-300: #b5c0cc;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --border-radius: 0.5rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.2s ease-in-out;
}

/* Prevent horizontal scrolling */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    width: 100%;
}

.toast-notification {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    overflow: hidden;
    border-left: 4px solid transparent;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
    animation: slideInRight 0.3s ease-out;
}

.toast-notification.hide {
    transform: translateX(120%);
    opacity: 0;
    animation: fadeOut 0.3s ease-out;
}

/* Success Toast */
.toast-notification.success {
    border-left-color: var(--success-color, #28a745);
    background-color: #f0f9f0;
}

.toast-notification.success .toast-icon {
    color: var(--success-color, #28a745);
}

/* Error Toast */
.toast-notification.error {
    border-left-color: var(--danger-color, #dc3545);
    background-color: #fdf0f0;
}

.toast-notification.error .toast-icon {
    color: var(--danger-color, #dc3545);
}

/* Info Toast */
.toast-notification.info {
    border-left-color: var(--primary-color, #2563eb);
    background-color: #f0f5ff;
}

.toast-notification.info .toast-icon {
    color: var(--primary-color, #2563eb);
}

.toast-icon {
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    font-weight: bold;
}

.toast-message {
    flex-grow: 1;
    color: #2d3748;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 20px;
    cursor: pointer;
    padding: 0 0 0 10px;
    margin-left: 10px;
    line-height: 1;
    transition: color 0.2s;
    opacity: 0.7;
}

.toast-close:hover {
    color: #4a5568;
    opacity: 1;
}

/* Animation */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Floating Cart Button */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background-color: var(--primary-dark);
}

.floating-cart .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: #E6ECF1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    /* margin-bottom: 1.25rem; */
    color: var(--dark-color);
}

h1 { 
    font-size: 3rem;
    line-height: 1.1;
    letter-spacing: -0.05em;
}

h2 { 
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

h3 { 
    font-size: 1.5rem;
    /* margin-bottom: 1rem; */
}

p {
    margin-bottom: 1.25rem;
    color: #333333;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
    font-weight: 700;
    color: var(--dark-color);
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.75rem;
    width: 3rem;
    height: 0.25rem;
    background-color: var(--primary-color);
    border-radius: 0.125rem;
}

.text-center {
    text-align: center;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: #1A365D;
    color: white;
    border-color: #1A365D;
}

.btn-primary:hover {
    background-color: #0f2540;
    border-color: #0f2540;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: #1A365D;
    border: 2px solid #1A365D;
}

.btn-outline:hover {
    background-color: rgba(26, 54, 93, 0.1);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-light {
    background-color: white;
    color: #D1A16C;
    border: 1px solid #D1A16C;
}

.btn-light:hover {
    background-color: #D1A16C;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.05em;
}

.hero .lead {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-weight: 300;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2.5rem;
}

.hero-cta .btn {
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-cta .btn-primary {
    background-color: #1A365D;
    border: 2px solid #1A365D;
}

.hero-cta .btn-outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.hero-cta .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hero-image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Shipping Banner */
.shipping-banner {
    background-color: #e53e3e;
    color: white;
    padding: 0.5rem 0;
    overflow: hidden;
    position: relative;
    z-index: 60;
    width: 100%;
}

.shipping-banner-content {
    display: inline-block;
    white-space: nowrap;
    padding-right: 100%;
    /* Duplicate the content to create seamless loop */
    animation: scrollBanner 40s linear infinite;
    width: max-content;
    min-width: 100%;
    position: relative;
    left: 100%;
}

.shipping-banner:hover .shipping-banner-content {
    animation-play-state: paused;
}

.shipping-banner span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 2rem;
}

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

/* Header */
.header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: #1A365D;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    transition: var(--transition);
}

.header.scrolled {
    padding: 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* max-width: 1400px; */
    margin: 0 auto;
    padding: 1rem 2rem;
    width: 100%;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-image {
    /* Fluid: full 56px on desktop, scales down with narrow viewports so the
       header row keeps clearance between logo and cart/hamburger. */
    height: clamp(44px, 14vw, 56px);
    width: auto;
    max-width: min(200px, 40vw);
    object-fit: contain;
}

/* Navigation */
.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-list a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-list > li {
    margin-left: 1.5rem;
    position: relative;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle i.fa-chevron-down {
    font-size: 0.7em;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-toggle::after
{
    display: none;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: block !important;
    border: 1px solid #D1A16C;
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block !important;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    color: #1A365D;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
    color: #1A365D;
    transition: transform 0.2s ease;
}

/* Nested categories styles */
.category-item {
    position: relative;
}

.category-item > .dropdown-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    color: #000000;
}

.submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: #ffffff;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0 8px 8px 0;
    padding: 0.5rem 0;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 8px 8px 8px;
    z-index: 1002;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s ease;
    border: 1px solid #D1A16C;
}

.submenu .dropdown-item {
    color: #1A365D;
}

.submenu .dropdown-item:hover {
    color: #1A365D;
}

.category-item:hover > .submenu {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* Make sure parent items with submenus are clickable */
.has-submenu {
    position: relative;
}

/* Add hover effect for better UX */
.category-item:hover > .dropdown-item {
    background-color: #E6ECF1;
    color: #1A365D;
}

/* Make sure the dropdown stays open when hovering over submenu */
.dropdown-menu:hover {
    display: block;
}

.dropdown-item:hover {
    background-color: #E6ECF1;
    color: #1A365D;
    padding-left: 1.5rem;
}

.nav-list > li > a:hover,
.nav-list > li > a.active {
    color: #FF8F00;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-link {
    position: relative;
    display: inline-block;
    font-size: 1.25rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
}

.user-greeting {
    color: var(--text-light);
    font-size: 0.9rem;
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main Content */
.main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Featured Categories Section */
.featured-categories {
    background-color: #E6ECF1;
    padding: 4rem 0;
}

.featured-categories .product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-section {
    margin-bottom: 4rem;
}

.category-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.view-all {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.view-all:hover {
    color: var(--primary-dark);
}

.view-all:hover i {
    transform: translateX(4px);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.product-card {
    border: 1px solid #D1A16C;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    background: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.product-card .product-price {
    padding: 0.25rem 0;
    margin: 0.25rem 0 0.5rem 0;
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
}

.product-card:hover .product-price {
    opacity: 1;
    transform: translateY(0);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--light-gray);
    position: relative;
    overflow: hidden;
}

.product-actions-top {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: row;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-card:hover .product-actions-top {
    opacity: 1;
    visibility: visible;
}

.btn-cart-icon,
.btn-buy-now-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    background: #FF8F00;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    position: relative;
    padding: 0;
    margin: 0;
    font-size: 16px;
}

.btn-cart-icon:hover {
    background: #e68000;
    color: white;
    transform: scale(1.1);
}

.btn-cart-icon .tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.btn-cart-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    margin-top: 12px;
}

/* Ensure the discount badge and cart button don't overlap */
.discount-badge {
    z-index: 2;
    left: 10px;
    right: auto;
}

.product-image img{
    width: 100%;
    height: 100%;
    object-fit: contain; /* show the whole product photo, never crop */
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #FF8F00;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 0.85rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.product-rating {
    margin: 0.25rem 0 0.5rem 0;
    display: flex;
    align-items: center;
    flex-grow: 1;
}

/* Product actions container is no longer needed as buttons are now in the top-right corner */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-add-to-cart,
.btn-buy-now {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-to-cart {
    background-color: #FF8F00;
    color: white;
    border: 1px solid #FF8F00;
}

.btn-add-to-cart:hover {
    background-color: #e68000;
    border-color: #e68000;
}

.btn-buy-now-icon {
    background-color: #FF8F00;
    color: white;
}

.btn-buy-now-icon:hover {
    background-color: #e68000;
    transform: scale(1.1);
}

/* Tooltip styles */
.btn-cart-icon .tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-buy-now-icon .tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.btn-cart-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    margin-top: 10px;
}

.btn-buy-now-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    margin-top: 12px;
    margin-right: 0;
}

/* Toast Notifications */
#toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 12px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
}

#toast.success {
    background-color: #38a169;
}

#toast.error {
    background-color: #e53e3e;
}

#toast.info {
    background-color: #3182ce;
}

/* Ensure buttons are properly aligned in the product card */
.product-info {
    padding-bottom: 1rem;
}

.price-original {
    text-decoration: line-through;
    color: #777;
    font-size: 0.8em;
    margin-right: 0.5rem;
    font-weight: 400;
}

.price-current {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.product-stock {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #D1A16C;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: #D1A16C;
    box-shadow: 0 0 0 3px rgba(209, 161, 108, 0.1);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--primary-color);
    background: var(--light-gray);
}

.table tbody tr:hover {
    background: var(--light-gray);
}

/* Badges - Bootstrap 5.3 ships no .badge-success/-warning/-primary (they are
   Bootstrap 4 names) and its bare .badge has white text with no background,
   so these are defined here. Pages using Bootstrap 5's bg-* utilities are
   unaffected because these modifiers are not applied to them. */
.badge-success {
    color: #14532d;
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
}

.badge-warning {
    color: #92400e;
    background-color: #fef3c7;
    border: 1px solid #fde68a;
}

.badge-primary {
    color: #ffffff;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.badge-neutral {
    color: #374151;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Cart */
.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #D1A16C;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    background: #ffffff;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.cart-item-details {
    flex: 1;
}

.cart-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quantity-input {
    width: 60px;
    text-align: center;
    padding: 0.25rem;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.dashboard-card:hover {
    box-shadow: var(--shadow);
}

.dashboard-card h3 {
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo-image {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.footer-section p {
    color: #ffffff;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ffffff;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

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

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Brand glyphs are inline SVG now (includes/social-icons.php) rather than the
   Font Awesome brand webfont, so they need an explicit size. */
.social-links a .social-icon {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
    fill: currentColor;
}

/* Testimonial cards sit well below the fold. content-visibility:auto lets the
   browser skip their style/layout work until they scroll near, and
   contain-intrinsic-size reserves space so skipping cannot shift the page.
   Browsers without support simply ignore both declarations. */
.testimonials {
    content-visibility: auto;
    contain-intrinsic-size: auto 2200px;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    transition: var(--transition);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 1rem;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .cart-item {
        flex-direction: column;
    }
    
    .cart-item-image {
        width: 100%;
        height: 150px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Floating Cart Button */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.floating-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    font-size: 1.5rem;
    position: relative;
}

.floating-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.floating-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Hide floating cart on cart page */
body.page-cart .floating-cart {
    display: none;
}

/* Responsive floating cart */
@media (max-width: 768px) {
    .floating-cart {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-cart-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .btn,
    .floating-cart {
        display: none;
    }
    
    .main {
        padding: 0;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Page Header Styles */
.page-header-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: space-between;
}

.page-header-row h1 {
    margin: 0;
    color: #1f2937;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 768px) {
    .page-header-row {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .page-header-row h1 {
        text-align: center;
        font-size: 1.5rem;
    }
}

/* Common Button Styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #FF8F00;
    color: white;
}

.btn-primary:hover {
    background: #e68000;
}

.btn-secondary {
    background: #D1A16C;
    color: white;
}

.btn-secondary:hover {
    background: #b8905a;
}

.btn-cta {
    background: #FF8F00;
    color: white;
    border-color: #FF8F00;
}

.btn-cta:hover {
    background: #e68000;
    border-color: #e68000;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-text {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-text:hover {
    background: #f3f4f6;
    color: #374151;
}

.btn-block {
    display: block;
    width: 100%;
}
/* ============================================
   Star ratings (product cards, product page, reviews)
   ============================================ */
.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #f59e0b;
    font-size: 0.85rem;
    line-height: 1;
}

.star-rating i {
    font-size: 0.85rem;
}

.star-rating .rating-count {
    color: #64748b;
    font-size: 0.78rem;
    margin-left: 4px;
}

.star-rating-lg {
    font-size: 1.15rem;
    gap: 3px;
}

.star-rating-lg i {
    font-size: 1.15rem;
}

.star-rating-lg .rating-count {
    font-size: 0.9rem;
}

/* Reviews block on the product page */
.product-reviews {
    max-width: 1000px;
    margin: 3rem auto 0;
    padding: 0 15px;
}

.reviews-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.reviews-average {
    text-align: center;
    min-width: 120px;
}

.reviews-average .average-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1A365D;
    line-height: 1;
}

.reviews-breakdown {
    flex: 1;
    min-width: 220px;
}

.reviews-breakdown-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 4px;
}

.reviews-breakdown-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.reviews-breakdown-bar span {
    display: block;
    height: 100%;
    background: #f59e0b;
}

.review-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.review-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    background: #1A365D;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.review-body h4 {
    margin: 0.35rem 0 0.25rem;
    font-size: 1rem;
    color: #1e293b;
}

.review-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #64748b;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #15803d;
    background: #dcfce7;
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 0.72rem;
    font-weight: 600;
}

.review-form {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.review-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 6px;
}

.review-form input[type="text"],
.review-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

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

.review-stars-input {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 1rem;
}

.review-stars-input input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.review-stars-input label {
    cursor: pointer;
    color: #cbd5e1;
    font-size: 1.5rem;
    margin: 0;
    line-height: 1;
}

.review-stars-input input:checked ~ label,
.review-stars-input label:hover,
.review-stars-input label:hover ~ label {
    color: #f59e0b;
}

.reviews-empty {
    color: #64748b;
    padding: 1.25rem 0;
}

/* Header search button + full-screen search modal */
.search-open {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: var(--transition);
}

.search-open:hover {
    color: #ff8f00;
    transform: scale(1.1);
}

.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.94);
    z-index: 3000;
    padding: 1.5rem;
    overflow-y: auto;
}

.search-modal.search-modal-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal-content {
    position: relative;
    width: 100%;
    max-width: 720px;
    background: #fff;
    border-radius: 16px;
    padding: 3rem 2.5rem 2.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.search-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #334155;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-modal-close:hover {
    background: #ff8f00;
    color: #fff;
    transform: rotate(90deg);
}

.search-modal-title {
    margin: 0 0 1.5rem;
    font-size: 1.6rem;
    color: #1a365d;
}

.search-modal-form {
    display: flex;
    gap: 0.75rem;
}

.search-modal-input {
    flex: 1;
    min-width: 0;
    padding: 0.95rem 1.1rem;
    font-size: 1.05rem;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-modal-input:focus {
    border-color: #ff8f00;
}

.search-modal-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.95rem 1.6rem;
    border: none;
    border-radius: 10px;
    background: #ff8f00;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-modal-submit:hover {
    background: #e68000;
}

/* ============================================================
   MOBILE (<=768px) — header, slide-down menu, categories panel
   Placed near the end of the file so equal-specificity rules
   here win by source order over the earlier desktop rules.
   ============================================================ */

/* Auth shortcuts live inside the slide-down menu on phones; the
   header Login/Register buttons are hidden at <=768px. */
.mobile-only-auth {
    display: none;
}

@media (max-width: 768px) {
    /* ---- Header row: logo + actions + hamburger stay on ONE line ---- */
    .header-content {
        flex-wrap: wrap;
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }

    .logo-image {
        height: clamp(38px, 12vw, 48px);
        max-width: min(160px, 42vw);
    }

    .header-actions {
        gap: 0.9rem;
        margin-left: auto; /* hug the right edge next to the hamburger */
    }

    .header-actions .cart-link {
        font-size: 1.15rem;
    }

    /* Login/Register (or Hi, name / Logout) move into the menu */
    .header-actions .auth-links,
    .header-actions .user-menu {
        display: none;
    }

    .mobile-menu-toggle {
        gap: 5px;
        padding: 0.4rem 0.25rem;
    }

    /* Hamburger becomes an X while the menu is open */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* ---- Slide-down menu: full-width, left-aligned, scrollable ---- */
    .nav {
        margin-top: 0.5rem;
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .nav-list {
        align-items: stretch; /* was centre: items floated mid-row */
        gap: 0;
    }

    .nav-list > li {
        margin-left: 0;
        width: 100%;
    }

    .nav-list > li > a {
        padding: 0.85rem 0.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        justify-content: flex-start;
    }

    .mobile-only-auth {
        display: block;
        width: 100%;
    }

    /* ---- Categories: expand INSIDE the menu, no floating panel ---- */
    .dropdown-menu {
        position: static;
        display: none !important;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: 0;
        width: 100%;
        margin: 0;
        padding: 0.25rem 0;
        border: 0;
        border-radius: 0 0 8px 8px;
        box-shadow: none;
        background: #ffffff;
    }

    .dropdown-menu:hover {
        display: none !important;
    }

    .dropdown.open .dropdown-menu,
    .dropdown.open .dropdown-menu:hover {
        display: block !important;
    }

    .dropdown-item {
        white-space: normal;
        padding: 0.7rem 0.75rem !important;
        color: #1A365D;
    }

    .dropdown-item:hover {
        padding-left: 0.75rem !important;
    }

    /* Sub-categories stack underneath instead of flying out to the
       right (which pushed them off-screen on phones). */
    .submenu {
        position: static;
        display: none;
        left: auto;
        top: auto;
        opacity: 1;
        transform: none;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0.25rem 0 0.25rem 0.75rem;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #F3F6FA;
    }

    .submenu .dropdown-item {
        color: #1A365D;
        font-size: 0.95rem;
    }

    .category-item:hover > .submenu {
        display: none;
    }

    .category-item.open > .submenu {
        display: block;
    }
}

@media (max-width: 576px) {
    .search-modal-content {
        padding: 2.75rem 1.25rem 1.5rem;
    }

    .search-modal-form {
        flex-direction: column;
    }

    .search-modal-submit {
        justify-content: center;
    }
}
