@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* Global Styles */
:root {
    --primary: #e63946;
    --secondary: #ffffff;
    --accent: #2a6592;
    --text: #000000;
    --text-red: #e63946;
    --light-gray: #f5f5f5;
    --dark-gray: #666666;
    --success: #28a745;
    --warning: #ffc107;
    --bg: #ffffff;
    --button-text: #ffffff;
    --header-bg: #ffffff;
    --footer-bg: #2a6592;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: #dddddd;
    --button-hover: #c42833;
    --dot-inactive: rgba(0, 0, 0, 0.3);
    --dot-active: #333333;
    /* Login Modal Theme */
    --modal-bg: #ffffff;
    --modal-text: #000000;
    --modal-border: #dddddd;
    --modal-input-bg: #ffffff;
    --modal-input-text: #000000;
    --modal-btn-primary: #e63946;
    --modal-btn-secondary: #2a6592;
    --modal-tab-active: #e63946;
    --modal-tab-inactive: #666666;
    --modal-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    --modal-radius: 12px;
    --modal-padding: 24px;
    --modal-width: 90%;
    --modal-max-width: 500px;
    --modal-z-index: 1000;
}

/* Remove all [data-theme] and light/dark mode specific styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    color: var(--text);
    line-height: 1.6;
    background-color: #fff;
}

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

img {
    max-width: 100%;
}

/* Header Styles */
header {
    background: linear-gradient(90deg, #222 20%, #e63946 80%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
}

/* Navigation Menu */
.main-nav {
    background: linear-gradient(90deg, #222 20%, #e63946 80%) !important;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-nav .nav-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.main-nav .nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    background-color: transparent;
}

.main-nav .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.main-nav .nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.main-nav .nav-links a:hover {
    opacity: 1;
}

/* Add highlight box for active navigation link */
.main-nav .nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2) !important;
    font-weight: 600 !important;
}

.main-nav .nav-links a.active::after {
    transform: scaleX(1) !important;
    transform-origin: left !important;
    height: 3px !important;
    background-color: #fff !important;
}

.main-nav .nav-links a.active .nav-emoji {
    transform: scale(1.1);
}

/* Remove sticky positioning from main header */
header .container:first-child {
    position: relative;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.header-controls {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.logo span {
    color: var(--accent);
}

/* Logo Container with Tooltip */
.logo-container {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    padding: 8px 15px;
    border-radius: 8px;
    margin-right: 20px;
    position: relative;
    cursor: pointer;
}

/* Logo Image tooltip */
.logo-img {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* New tooltip implementation */
.logo-img[data-tooltip] {
    overflow: visible;
}

.logo-img[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    bottom: -35px;
    min-width: 150px;
    padding: 5px 8px;
    font-size: 12px;
    background: var(--card-bg);
    color: var(--text);
    text-align: center;
    border-radius: 4px;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Light mode styles */
[data-theme="light"] .logo-img[data-tooltip]:hover::after {
    background: var(--header-bg);
    color: white;
}

/* Remove old tooltip styles from container */
.logo-container[data-tooltip]::before,
.logo-container[data-tooltip]::after {
    display: none;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text);
    color: var(--bg);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99999 !important; /* Very high z-index to ensure it's above all modals and dialogs */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-left: 4px solid transparent;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    min-width: 250px;
    max-width: 80%;
}

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

/* Toast types */
.toast.success {
    background-color: var(--success);
    border-left-color: #1e7e34;
}

.toast.error {
    background-color: var(--primary);
    border-left-color: #bd2130;
}

.toast.warning {
    background-color: var(--warning);
    color: #212529;
    border-left-color: #d39e00;
}

.toast.info {
    background-color: var(--accent);
    border-left-color: #117a8b;
}

/* Fix navigation display */
nav ul {
    display: flex;
    list-style: none;
    position: relative;
    background-color: var(--header-bg);
}

nav ul.show {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    flex-direction: column;
}

nav li {
    margin-left: 1.5rem;
}

nav a {
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

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

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 0.5rem;
    z-index: 1000;
}

.account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
    margin-left: 1.5rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

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

.account-btn .profile-icon {
    font-size: 20px;
    transition: all 0.3s ease;
}

.account-btn .login-text {
    font-size: 16px;
    transition: all 0.3s ease;
}

.account-btn svg {
    margin-right: 5px;
    flex-shrink: 0;
}

.cart-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--primary);
    margin-left: 1rem;
    position: relative;
}

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

/* Main section backgrounds */
.hero, .categories, .featured, .shop-section, .cart-section, .profile-section {
    background-color: var(--bg);
    transition: background-color 0.3s ease;
}

/* Category and Product Cards */
.category-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    min-height: 280px;
}

.category-img {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.category-content {
    padding: 1.2rem;
}

.category-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.category-content p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.carousel-products-inner {
    display: grid;
    grid-template-columns: repeat(8, 280px);
    gap: 1.5rem;
    transition: transform 0.3s ease;
    padding: 0.5rem;
}

@media (max-width: 1200px) {
    .category-card {
        min-height: 260px;
}

.category-img {
    height: 180px;
    }
    
    .category-content h3 {
        font-size: 1.2rem;
    }
    
    .category-content p {
        font-size: 1rem;
    }
}

@media (max-width: 900px) {
    .category-card {
        min-height: 240px;
    }
    
    .category-img {
        height: 160px;
    }
    
    .carousel-products-inner {
        grid-template-columns: repeat(6, 260px);
        gap: 1.2rem;
    }
}

@media (max-width: 600px) {
    .category-card {
        min-height: 220px;
    }
    
    .category-img {
        height: 140px;
    }
    
    .carousel-products-inner {
        grid-template-columns: repeat(4, 240px);
        gap: 1rem;
    }
    
    .category-content h3 {
        font-size: 1.1rem;
    }
    
    .category-content p {
        font-size: 0.95rem;
    }
}

/* Popular Categories Section */
.popular-categories {
    background-color: var(--bg);
    padding: 4rem 0;
    transition: background-color 0.3s ease;
}

/* Featured Products Section */
.featured {
    padding: 4rem 0;
    background-color: var(--bg);
    transition: background-color 0.3s ease;
}

/* Main Content Area */
main {
    background-color: var(--bg);
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

/* Section Backgrounds */
section {
    background-color: var(--bg);
    transition: background-color 0.3s ease;
}

/* Index Page Styles */
.hero {
    background-color: var(--bg);
    padding: 4rem 0;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.hero p {
    margin-bottom: 2rem;
    color: var(--dark-gray);
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary);
    color: var(--button-text);
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    width: auto;
    min-width: fit-content;
    max-width: max-content;
}

.btn:hover {
    background-color: rgba(230, 57, 70, 0.8);
}

.btn .hammer {
    margin-left: 6px;
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.btn:hover .hammer {
    transform: rotate(-15deg);
}

.btn-secondary {
    background-color: var(--dark-gray);
    color: white;
    position: relative;
    padding-left: 2.5rem;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>') no-repeat center;
}

.categories {
    padding: 3rem 0;
    background: #f8f9fa;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.featured {
    padding: 2rem 0;
    background: #fff;
}

/* Update Product Card Styles */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 200px;
    border: 1px solid #eee;
    padding: 0;
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.13);
}

.product-img {
    position: relative;
    width: 100%;
    height: 120px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-content {
    padding: 0.7rem 1rem 0.7rem 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.price {
    font-size: 1rem;
    font-weight: 700;
    color: #e63946;
    margin-bottom: 0.4rem;
}

.product-description {
    color: #666;
    font-size: 0.93rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
    flex-grow: 1;
    max-height: 3.9em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Product Image Overlay */
.product-img-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.7rem 0.4rem 0.7rem;
    width: 100%;
    pointer-events: none;
    z-index: 2;
}

.in-stock-ping {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 200, 81, 0.1);
    color: #000;
    border-radius: 1rem;
    font-size: 0.9rem;
    border: none;
    font-weight: 400;
    text-shadow: none;
    box-shadow: none;
}

.in-stock-ping.out-of-stock {
    background: rgba(255, 68, 68, 0.1);
    color: #000;
}

.ping-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00C851;
    margin-right: 6px;
    border: none;
    box-shadow: none;
    display: inline-block;
}

.out-of-stock .ping-dot {
    background: #ff4444;
}

.product-price {
    font-size: 1.08rem;
    color: #fff;
    background: #e63946;
    border-radius: 12px;
    padding: 2px 12px 2px 8px;
    font-weight: 700;
    box-shadow: 0 1px 4px #0002;
    text-shadow: 0 1px 2px #0008;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Update grid to ensure equal heights */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 0;
    margin-bottom: 2rem;
}

.add-to-cart {
    display: block;
    width: 100%;
    margin: 1rem 0 0 0;
    padding: 0.8rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: rgba(230, 57, 70, 0.8);
}

@media (max-width: 900px) {
    .product-card {
        min-width: 200px;
        max-width: 220px;
        padding: 1.1rem 0.7rem 1.1rem 0.7rem;
    }
    .product-img {
        height: 110px;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.1rem;
    }
    .product-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 600px) {
    .product-card {
        min-width: 150px;
        max-width: 160px;
        padding: 0.7rem 0.3rem 0.7rem 0.3rem;
    }
    .product-img {
        height: 70px;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }
    .product-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    margin: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid var(--light-gray);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 1.5rem;
    position: relative;
    padding: 0 0.5rem;
    background-color: var(--card-bg);
}

.tab-btn {
    padding: 0.8rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    margin-right: 1rem;
    color: var(--text);
    transition: color 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-content {
    display: none;
    padding: 0 0.5rem;
    background-color: var(--card-bg);
}

.tab-content.active {
    display: block;
}

.modal-title {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
    padding: 0;
    line-height: 1;
}

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

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

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    background-color: var(--input-bg);
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(42, 101, 146, 0.1);
}

/* Shop Page Styles */
.shop-section {
    padding: 4rem 0;
    background-color: var(--bg);
}

.shop-section .container {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

/* Sidebar styles */
#categorySidebar {
    list-style: none;
    padding: 0;
    margin: 0;
}
#categorySidebar li {
    margin-bottom: 0.7rem;
}
#categorySidebar a {
    color: #222;
    font-size: 1.08rem;
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    display: block;
    transition: background 0.2s, color 0.2s;
}
#categorySidebar a.active, #categorySidebar a:hover {
    background: #e63946;
    color: #fff;
}

/* Product grid and card styles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 0;
    margin-bottom: 2rem;
}
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 200px;
    border: 1px solid #eee;
    padding: 0;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(44,101,146,0.13);
}
.product-img {
    position: relative;
    width: 100%;
    height: 120px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.product-content {
    padding: 0.7rem 1rem 0.7rem 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.3rem;
    line-height: 1.2;
}
.price {
    font-size: 1rem;
    font-weight: 700;
    color: #e63946;
    margin-bottom: 0.4rem;
}
.product-description {
    color: #666;
    font-size: 0.93rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
    flex-grow: 1;
    max-height: 3.9em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .product-card {
        min-height: 350px;
    }
    .product-img {
        height: 180px;
    }
}
@media (max-width: 900px) {
    .shop-section .container {
        flex-direction: column;
        gap: 1.5rem;
    }
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .product-card {
        min-height: 280px;
    }
    .product-img {
        height: 120px;
    }
}

.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.search-group,
.filter-group,
.sort-group {
    flex: 1;
    min-width: 200px;
}

.search-group label,
.filter-group label,
.sort-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.search-group input,
.filter-group select,
.sort-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--input-bg);
    color: var(--text);
    transition: all 0.3s ease;
}

.search-group input:focus,
.filter-group select:focus,
.sort-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(42, 101, 146, 0.1);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 0;
    margin-bottom: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 200px;
    border: 1px solid #eee;
    padding: 0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(44,101,146,0.13);
}

.product-img {
    position: relative;
    width: 100%;
    height: 120px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-content {
    padding: 0.7rem 1rem 0.7rem 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.price {
    font-size: 1rem;
    font-weight: 700;
    color: #e63946;
    margin-bottom: 0.4rem;
}

.product-description {
    color: #666;
    font-size: 0.93rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
    flex-grow: 1;
    max-height: 3.9em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.add-to-cart {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.add-to-cart:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
}

.add-to-cart:disabled {
    background-color: var(--light-gray);
    cursor: not-allowed;
    transform: none;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .shop-controls {
        padding: 1.2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 900px) {
    .shop-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group, .sort-group, .search-group {
        width: 100%;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.2rem;
    }
    
    .product-img {
        height: 200px;
    }
}

@media (max-width: 600px) {
    .shop-section {
        padding: 2rem 0;
    }
    
    .shop-controls {
        padding: 1rem;
        gap: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .product-img {
        height: 160px;
    }
    
    .product-content {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    .price {
        font-size: 1.2rem;
    }
    
    .product-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .add-to-cart {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
}

/* Cart Page Styles */
.cart-section {
    padding: 4rem 0;
}

.cart-empty {
    text-align: center;
    padding: 3rem;
    background-color: var(--bg);
    border-radius: 8px;
}

.cart-empty p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

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

/* Cart Table Styles */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cart-table th {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(var(--border-color-rgb, 0, 0, 0), 0.08);
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    text-transform: uppercase;
    background-color: var(--bg);
    letter-spacing: 0.5px;
}

.cart-item-row td {
    padding: 16px 1rem;
    vertical-align: middle;
    border-top: 1px solid rgba(var(--border-color-rgb, 0, 0, 0), 0.05);
    background-color: var(--bg);
    transition: background-color 0.2s;
}

.cart-item-row:first-child td {
    border-top: none;
}

.cart-item-row:hover td {
    background-color: var(--bg);
}

.product-cell {
    min-width: 280px;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-info img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    line-height: 1.4;
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.25rem;
    background-color: var(--bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.quantity-controls button {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: none;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.quantity-controls button:hover {
    background: var(--border-color);
    transform: scale(1.05);
}

.quantity-controls span {
    min-width: 24px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Quantity input styling for cart */
.quantity-controls .quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
}

.quantity-controls .quantity-input::-webkit-outer-spin-button,
.quantity-controls .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.remove-item {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
}

.remove-item:hover {
    background: rgba(255, 59, 48, 0.2);
    transform: scale(1.1);
}

.empty-cart {
    text-align: center;
    padding: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

.empty-cart-icon {
    width: 80px;
    height: 80px;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.price-cell, .subtotal-cell {
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 600;
}

.price-cell {
    color: var(--text-muted);
}

.subtotal-cell {
    color: var(--primary);
}

.action-cell {
    width: 30px;
    padding-right: 0.75rem !important;
    text-align: center;
}

.quantity-cell {
    width: 90px;
}

/* Cart item placeholder image styling */
.product-info img[src*="placeholder.jpg"] {
    opacity: 0.6;
    background-color: var(--bg);
}

/* Cart Summary Styles */
.cart-summary {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.cart-summary h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.summary-table {
    margin-bottom: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-weight: bold;
    font-size: 1.1rem;
    padding-top: 0.75rem;
}

/* Notes Styles */
.notes {
    margin-bottom: 1rem;
}

.notes label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.notes textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    resize: vertical;
}

.checkout-options {
    text-align: right;
}

.cart-footer {
    display: flex;
    justify-content: space-between;
    margin: 0.75rem 0;
    gap: 0.75rem;
}

/* Responsive Cart Styles */
@media (max-width: 768px) {
    .cart-table {
        display: block;
    }

    .cart-table thead {
        display: none;
    }

    .cart-item-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .cart-item-row td {
        padding: 0.25rem;
        border: none;
    }

    .product-cell {
        min-width: unset;
    }

    .quantity-cell {
        width: auto;
    }

    .action-cell {
        justify-self: end;
    }

    .cart-footer {
        flex-direction: column;
        gap: 1rem;
    }

    .cart-footer .btn {
        width: 100%;
    }
}

/* Checkout Page Styles */
.checkout-section {
    padding: 4rem 0;
}

.checkout-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.checkout-card {
    background-color: var(--bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 400px;
}

.checkout-card h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.order-items {
    margin-bottom: 1.5rem;
}

/* Profile Page Styles */
.profile-section {
    padding: 4rem 0;
}

.profile-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-card {
    background-color: var(--bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-card h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.profile-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-item {
    background-color: var(--bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    position: relative;
}

.order-item:hover {
    transform: translateY(-3px);
}

.order-item:last-child {
    margin-bottom: 0;
}

.order-item h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 0.5rem;
}

.order-status {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.order-status.pending {
    background-color: var(--warning);
    color: var(--text);
}

.order-status.confirmed {
    background-color: var(--success);
    color: var(--button-text);
}

.order-item p {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.order-item p strong {
    flex: 0 0 120px;
    color: var(--text);
    font-weight: 600;
}

.order-item p:not(:last-child) {
    margin-bottom: 0.75rem;
}

.order-item p.items {
    position: relative;
    padding-left: 1.5rem;
}

.order-item p.items::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%232a6592" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><path d="M3 6h18"></path><path d="M16 10a4 4 0 0 1-8 0"></path></svg>') no-repeat center;
}

.order-item p.notes {
    position: relative;
    padding-left: 1.5rem; /* Match the padding of other sections */
}
.order-item p.notes::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%232a6592" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><path d="M8 2v2"></path><path d="M12 2v2"></path><path d="M16 2v2"></path><path d="M6 8h12"></path><path d="M6 12h12"></path><path d="M6 16h12"></path></svg>') no-repeat center;}

.order-item p.shipping-address {
    position: relative;
    padding-left: 1.5rem;
}

.order-item p.shipping-address::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%232a6592" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>') no-repeat center;
}

.order-item p.phone-number {
    position: relative;
    padding-left: 1.5rem;
}

.order-item p.phone-number::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%232a6592" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>') no-repeat center;
}

.order-item p.payment-method {
    position: relative;
    padding-left: 1.5rem;
}

.order-item p.payment-method::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%232a6592" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line></svg>') no-repeat center;
}

.order-details-modal .modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

.order-details-modal h5 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.order-item-detail {
    border-bottom: 1px solid var(--secondary);
    padding: 0.5rem 0;
}

.order-item-detail:last-child {
    border-bottom: none;
}

.order-details-modal .form-group {
    margin-bottom: 1rem;
}

.order-details-modal .btn {
    margin-top: 1rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
    padding: 0;
    line-height: 1;
}

/* Footer Styles */
footer {
    background: linear-gradient(90deg, #222 20%, #e63946 80%) !important;
    color: #fff;
    padding: 2rem 0;
    margin-top: 3rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    top: unset;
    z-index: 100;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.footer-col ul {
    list-style: none;
}

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

.footer-col a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease;
    opacity: 0.9;
}

.footer-col a:hover {
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Notes Section Styling */
.notes {
    margin-top: 1.5rem;
}

.notes label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.notes textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
}

.notes textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(42, 101, 146, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .header-controls {
        gap: 10px;
    }

    nav ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--header-bg);
        flex-direction: column;
        padding: 80px 20px 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    nav ul.show {
        display: flex;
        transform: translateX(0);
    }

    nav li {
        margin: 1rem 0;
        width: 100%;
    }

    nav a {
        display: block;
        padding: 1rem;
        font-size: 1.2rem;
        border-radius: 8px;
        transition: background-color 0.3s ease;
    }

    nav a:hover {
        background-color: var(--light-gray);
    }

    .header-container {
        padding: 0.5rem 1rem;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .category-grid, .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-card {
        padding: 0.75rem;
    }

    .product-title {
        font-size: 1rem;
        margin: 0.5rem 0;
    }

    .price {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .cart-table {
        display: block;
        width: 100%;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tbody tr {
        display: block;
        margin-bottom: 1.5rem;
        border: 1px solid var(--light-gray);
        border-radius: 8px;
        padding: 1rem;
    }

    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
    }

    .cart-table td:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 1rem;
    }

    .product-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-img-small {
        width: 80px;
        height: 80px;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .quantity-control {
        margin: 0.5rem 0;
    }

    .quantity-btn {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .quantity-input {
        width: 50px;
        height: 36px;
        font-size: 1rem;
    }

    .cart-footer {
        flex-direction: column;
        gap: 1rem;
    }

    .checkout-container {
        padding: 1rem;
    }

    .checkout-card {
        padding: 1rem;
    }

    .order-item {
        padding: 1rem;
    }

    .order-item p {
        font-size: 0.9rem;
        margin: 0.5rem 0;
    }

    .order-status {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header-controls {
        gap: 5px;
    }
    
    .category-grid, .product-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
        padding: 1rem;
    }

    .tab-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tab-btn {
        width: 100%;
        padding: 0.75rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-control {
        padding: 0.75rem;
        font-size: 1rem;
    }

    .btn {
        width: 100%;
        margin: 0.5rem 0;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-col {
        padding: 0 1rem;
    }

    .carousel-wrapper {
        width: 100%;
        height: 300px;
    }
}

/* Medium screens */
@media (min-width: 481px) and (max-width: 1024px) {
    .container {
        width: 95%;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .carousel-wrapper {
        width: 450px;
        height: 350px;
        right: 40px;
    }

    .product-image {
        height: 350px;
    }

    .product-container {
        gap: 1.5rem;
    }
}

/* Large screens */
@media (min-width: 1025px) and (max-width: 1440px) {
    .container {
        width: 90%;
        max-width: 1100px;
    }

    .carousel-wrapper {
        width: 500px;
        height: 400px;
        right: 70px;
    }
}

/* Extra large screens */
@media (min-width: 1441px) {
    .container {
        max-width: 1300px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .carousel-wrapper {
        width: 600px;
        height: 450px;
        right: 100px;
    }
    
    .hero-content {
        max-width: 700px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
}

/* Improved Touch Targets */
.btn, 
.nav-link,
.quantity-btn,
.remove-btn,
.modal-close,
.tab-btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Enhanced Mobile Typography */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.5;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 1rem; }
}

/* Improved Mobile Spacing */
@media (max-width: 768px) {
    section {
        padding: 2rem 0;
    }

    .section-title {
        margin-bottom: 1.5rem;
    }

    .product-card,
    .category-card {
        margin-bottom: 1rem;
    }

    .cart-summary {
        margin-top: 1.5rem;
    }

    .checkout-options {
        gap: 1rem;
    }
}

/* FAQ Section */
.faq {
    padding: 60px 0;
    background-color: var(--bg);
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid var(--light-gray);
    background-color: var(--card-bg);
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    background: var(--card-bg);
    border: none;
    width: 100%;
    text-align: left;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    background: var(--light-gray);
}

.accordion-header::after {
    content: '+';
    position: relative;
    font-size: 24px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.accordion-item.active .accordion-header::after {
    content: '−';
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    background: var(--card-bg);
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
}

.accordion-content p {
    margin: 20px 0;
    font-size: 16px;
    color: var(--text);
    line-height: 1.6;
}

.accordion-item.active .accordion-content {
    padding: 0 20px 20px;
}

/* Mobile Responsive FAQ */
@media (max-width: 768px) {
    .accordion-header {
        padding: 15px;
        font-size: 16px;
    }

    .accordion-content {
        padding: 0 15px;
    }

    .accordion-item.active .accordion-content {
        padding: 0 15px 15px;
    }

    .accordion-content p {
        font-size: 14px;
        margin: 15px 0;
    }
}

/* About Us Section */
.about-us {
    padding: 60px 0;
    background: var(--bg);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: #333;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #555;
}

.about-images {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.about-img {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* Contact Us Section */
.contact-us {
    padding: 60px 0;
    background: var(--bg);
    border-top: 1px solid var(--light-gray);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    color: #333;
}

.contact-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #555;
}

.contact-content a {
    color: #e63946;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-content a:hover {
    color: rgba(230, 57, 70, 0.7);
    text-decoration: underline;
}

/* Responsive Design */
    @media (max-width: 768px) {
    .about-img {
    max-width: 100%;
    }

    .about-images {
        flex-direction: column;
        align-items: center;
    }

    .section-title {
        font-size: 2rem;
     }
}

/* Product Carousel */

/* Carousel Styles */
.carousel-wrapper {
    width: 500px;
    height: 400px;
    margin: 0;
    position: absolute;
    top: 50%;
    right: 90px;
    transform: translateY(-50%);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.carousel-control {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-control:hover {
    background: #fff;
    transform: scale(1.1);
}

.carousel-control i {
    color: #e63946;
    font-size: 1.2rem;
}

@media (max-width: 1200px) {
    .carousel-wrapper {
        position: relative;
        top: 0;
        right: 0;
        transform: none;
        margin: 2rem auto;
    }
}

.carousel-link-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.carousel-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Google Sign In Button */
.google-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--light-gray);
    color: var(--text);
    transition: background-color 0.3s ease;
}

.google-btn:hover {
    background-color: var(--light-gray);
}

/* Header and Footer Text Colors for Light Mode */
[data-theme="light"] header {
    color: #ffffff;
}

[data-theme="light"] nav a,
[data-theme="light"] .account-btn,
[data-theme="light"] .cart-btn,
[data-theme="light"] .logo,
[data-theme="light"] .mobile-toggle,
[data-theme="light"] header .btn {
    color: #ffffff;
}

[data-theme="light"] .cart-count {
    background-color: var(--accent);
    color: #ffffff;
}

[data-theme="light"] nav a:hover,
[data-theme="light"] .account-btn:hover,
[data-theme="light"] .cart-btn:hover {
    color: #e9ecef;
}

/* Footer text colors for light mode */
[data-theme="light"] footer {
    color: #ffffff;
}

[data-theme="light"] .footer-col h4,
[data-theme="light"] .footer-col p,
[data-theme="light"] .footer-col span,
[data-theme="light"] .footer-col li {
    color: #ffffff;
}

[data-theme="light"] .footer-col a {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .footer-col a:hover {
    color: #ffffff;
}

[data-theme="light"] .copyright {
    color: rgba(255, 255, 255, 0.7);
}

/* Keep accent colors */
[data-theme="light"] .logo span {
    color: var(--accent);
}

/* Logo styles for both themes */
.logo-container .logo {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-container .logo span {
    color: var(--accent);
}

/* Override previous light mode logo color */
[data-theme="light"] .logo-container .logo {
    color: var(--primary);
}

[data-theme="light"] .logo-container .logo span {
    color: var(--accent);
}

@media (max-width: 768px) {
    .logo-container {
        padding: 6px 12px;
        margin-right: 15px;
    }
    
    .logo-img {
        width: 30px;
        height: 30px;
        margin-right: 8px;
     }
}

/* Light mode specific styles */
[data-theme="light"] .account-btn {
    color: #ffffff;
}

[data-theme="light"] .account-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Navigation with emojis */
nav ul li a {
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    position: relative;
}

/* Remove emoji container styles */
.nav-link-container {
    display: none;
}

/* Remove emoji styles */
.nav-emoji {
    display: none;
}

/* Ensure text doesn't move */
.nav-link-container span {
    position: relative;
    display: inline-block;
}

/* Mobile menu animations */
@media (max-width: 768px) {
    nav ul li a {
        padding: 1rem;
    }
}

/* Logo animation */
.logo-img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.logo-img:hover {
    transform: scale(1.1);
}

/* Mobile toggle button animation */
.mobile-toggle {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.mobile-toggle:hover {
    transform: scale(1.1);
}

/* Account button animation */
.account-btn {
    transition: background-color 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, background-color;
}

.account-btn:hover {
    transform: translateY(-1px);
}

/* Cart button animation */
.cart-btn {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.cart-btn:hover {
    transform: translateY(-1px);
}

/* Checkout Order Summary Item Circles */
.order-items-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background-color: var(--bg);
    border-radius: 8px;
}

.order-item-circle {
    position: relative;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.order-item-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 0.5px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.order-item-circle:hover img {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.order-item-circle::after {
    content: attr(data-quantity);
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.order-item-circle[data-tooltip] {
    position: relative;
}

.order-item-circle[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background-color: var(--bg);
    color: var(--text);
    font-size: 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-item-circle:hover[data-tooltip]::before {
    opacity: 1;
    visibility: visible;
}

/* Placeholder for order item images */
.order-item-circle img[src*="placeholder.jpg"] {
    opacity: 0.6;
    background-color: var(--bg);
}

.profile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    transition: transform 0.2s ease;
}

.account-btn:hover .profile-icon,
nav ul li a:hover .nav-emoji {
    transform: scale(0.9);
}

.hammer {
    display: inline-block;
    margin-left: 5px;
    transition: transform 0.2s ease;
    /* Allow the hammer emoji to keep its native styling */
}

.btn:hover .hammer {
    transform: rotate(-15deg);
}

/* Color handling for light and dark themes */
[data-theme="light"] .profile-icon,
[data-theme="dark"] .profile-icon {
    color: inherit;
    /* Make emojis match text color */
    -webkit-text-fill-color: currentColor;
}

[data-theme="dark"] .profile-icon {
    color: inherit;
    /* Make emojis match text color */
    -webkit-text-fill-color: currentColor;
}

/* Preserve hammer emoji colors in both themes */
[data-theme="light"] .hammer,
[data-theme="dark"] .hammer {
    filter: none;
    opacity: 1;
    -webkit-text-fill-color: initial; /* Keep native colors */
}

/* SVG icon styling for profile icon */
.profile-icon svg {
    color: currentColor;
    stroke: currentColor;
    vertical-align: middle;
}

[data-theme="light"] .profile-icon svg {
    color: #ffffff;
    stroke: #ffffff;
}

[data-theme="dark"] .profile-icon svg {
    color: var(--text);
    stroke: var(--text);
}

/* Danger button and hidden utility classes */
.btn-danger {
    background-color: var(--primary);
    color: white;
}

.btn-danger:hover {
    background-color: #c42833;
}

.hidden {
    display: none !important;
}

/* Nickname feature styles */
.input-with-button {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-with-button .form-control {
    flex: 1;
}

.input-with-button .btn {
    white-space: nowrap;
}

.nickname-buttons {
    display: flex;
    gap: 10px;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

/* Confirm modal styles */
.confirm-modal .modal-content {
    max-width: 350px;
}

.confirm-modal h5 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.confirm-modal p {
    margin-bottom: 1.5rem;
}

.confirm-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 1.5rem;
}

/* Direct tooltip style */
.logo-img {
    position: relative;
}
.logo-img:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -30px;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 9999;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #ccc;
}

.quantity-btn:disabled:hover {
    background-color: #ccc;
}

/* Shipping Address Modal Styles */
#shippingAddressModal .modal-content {
    max-width: 500px;
    width: 90%;
    padding: 2rem;
}

#shippingAddressModal .modal-title {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

#shippingAddressModal .form-group {
    margin-bottom: 1.25rem;
}

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

#shippingAddressModal .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.2s ease;
}

#shippingAddressModal .form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

#shippingAddressModal .btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    font-size: 1rem;
}

#shippingAddressModal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

#shippingAddressModal .modal-close:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    #shippingAddressModal .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

#shippingAddressModal .modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

#shippingAddressModal .modal-actions .btn {
    flex: 1;
    margin: 0;
}

#shippingAddressModal .form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

#shippingAddressModal .form-control:invalid {
    border-color: var(--error-color);
}

#shippingAddressModal .form-control:invalid:focus {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(var(--error-rgb), 0.1);
}

@media (max-width: 480px) {
    #shippingAddressModal .modal-actions {
        flex-direction: column;
    }
}

/* Remove all [data-theme] specific styles */
[data-theme="light"] header,
[data-theme="dark"] header,
[data-theme="light"] nav a,
[data-theme="dark"] nav a,
[data-theme="light"] .cart-count,
[data-theme="dark"] .cart-count,
[data-theme="light"] nav a:hover,
[data-theme="dark"] nav a:hover,
[data-theme="light"] footer,
[data-theme="dark"] footer,
[data-theme="light"] .footer-col h4,
[data-theme="dark"] .footer-col h4,
[data-theme="light"] .footer-col a,
[data-theme="dark"] .footer-col a,
[data-theme="light"] .footer-col a:hover,
[data-theme="dark"] .footer-col a:hover,
[data-theme="light"] .copyright,
[data-theme="dark"] .copyright,
[data-theme="light"] .logo span,
[data-theme="dark"] .logo span,
[data-theme="light"] .logo-container .logo,
[data-theme="dark"] .logo-container .logo,
[data-theme="light"] .logo-container .logo span,
[data-theme="dark"] .logo-container .logo span,
[data-theme="light"] .account-btn,
[data-theme="dark"] .account-btn,
[data-theme="light"] .account-btn:hover,
[data-theme="dark"] .account-btn:hover,
[data-theme="light"] .profile-icon,
[data-theme="dark"] .profile-icon,
[data-theme="light"] .hammer,
[data-theme="dark"] .hammer,
[data-theme="light"] .profile-icon svg,
[data-theme="dark"] .profile-icon svg {
    /* Remove all theme-specific styles */
    all: unset;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-red);
}

/* Global Search Button Styles */
.search-container {
    position: relative;
    width: 500px;
}

.search-container input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    box-sizing: border-box;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.search-btn:hover {
    background: #f5f5f5;
}

/* Header Search Styles */
.header-search {
    position: relative;
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
    display: flex;
    align-items: center;
}

.header-search input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    box-sizing: border-box;
}

.header-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.header-search button svg {
    width: 20px;
    height: 20px;
    stroke: #e53935;
    stroke-width: 2;
}

.header-search button:hover {
    background: #f5f5f5;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2a6592;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 1.5);
    outline: none;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background: #1e4b6e;
    border-color: rgba(0, 0, 0, 0.3);
}

.scroll-to-top i {
    font-size: 24px;
}

/* --- Custom Hero Carousel Styles (Steps 2 & 4) --- */
.hero-carousel, .carousel-bg {
  position: relative;
  width: 100%;
  height: 400px;
  background: url('images/your-carousel-image.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1;
}

.carousel-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  color: white;
  text-align: center;
  z-index: 2;
  background: rgba(0, 0, 0, 0.4);
  padding-bottom: 1rem;
}

/* Carousel Headline Styles */
.carousel-headline { display: none !important; }

.carousel-headline span { display: none !important; }

.carousel-headline span.active { display: none !important; }

/* Remove any conflicting styles */
.carousel-headline span:last-child { display: none !important; }

/* Brandline replacing old hero text */
.carousel-brandline {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    position: absolute;
    bottom: 7.5rem; /* lift higher to create more space below */
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 1.6rem; /* more breathing room inside border */
    border-radius: 12px;
    border: 1.5px solid rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.carousel-brandline .brandline-logo {
    width: 48px;
    height: 48px;
    object-fit: cover; /* fit image nicely inside rounded border */
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}
.carousel-brandline .brand-red { color: #e63946; font-weight: 800; }
.carousel-brandline .brand-blue { color: #1e6fd9; font-weight: 800; }

/* Letters animation baseline */
.carousel-brandline .letter {
    display: inline-block;
    line-height: 1em;
}

@media (max-width: 768px) {
    .carousel-brandline { font-size: 2.5rem; bottom: 5rem; padding: 0.75rem 1.2rem; border-radius: 10px; }
    .carousel-brandline .brandline-logo { width: 40px; height: 40px; }
}
@media (max-width: 480px) {
    .carousel-brandline { font-size: 2rem; bottom: 4rem; padding: 0.6rem 0.9rem; border-radius: 8px; }
    .carousel-brandline .brandline-logo { width: 32px; height: 32px; }
}

@media (max-width: 768px) {
    .carousel-headline { display: none !important; }
}

@media (max-width: 480px) {
    .carousel-headline { display: none !important; }
}

.carousel-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  width: 100%;
  position: relative;
  bottom: 0;
  padding-bottom: 1.25rem; /* more space between brandline and buttons */
}

.carousel-share {
  background: #e63946;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  margin: 0;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.carousel-share:hover {
  background: #b71c1c;
  color: #fff;
}

.carousel-cta {
  background: #e63946;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.carousel-cta:hover {
  background: #d32f2f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.5);
}

.carousel-cta i {
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .carousel-nav {
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  .carousel-cta {
    font-size: 0.85rem;
    padding: 0.2em 0.5em;
  }
}

@media (max-width: 480px) {
  .carousel-nav {
    gap: 0.3rem;
  }
  .carousel-cta {
    font-size: 0.8rem;
    padding: 0.2em 0.4em;
  }
}

.carousel-count {
  background: rgba(0,0,0,0.7);
  padding: 0.3em 0.7em;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  height: 28px;
}

.carousel-pause, .carousel-prev, .carousel-next {
  background: #fff;
  color: #e63946;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  margin: 0;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.carousel-pause:hover, .carousel-prev:hover, .carousel-next:hover {
  background: #e63946;
  color: #fff;
}

@media (max-width: 768px) {
  .hero-carousel, .carousel-bg {
    height: 250px;
  }
  .carousel-headline { display: none !important; }
  .carousel-nav {
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  .carousel-cta {
    font-size: 0.85rem;
    padding: 0.2em 0.5em;
  }
}

@media (max-width: 480px) {
  .hero-carousel, .carousel-bg {
    height: 160px;
  }
  .carousel-headline { display: none !important; }
}

.carousel-nav .carousel-share,
.carousel-nav .carousel-prev,
.carousel-nav .carousel-next {
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  border-radius: 50%;
  background: #e63946;   /* Red background */
  color: #fff;           /* White icon */
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.1em;
  transition: background 0.2s, color 0.2s;
}

.carousel-nav .carousel-share:hover,
.carousel-nav .carousel-prev:hover,
.carousel-nav .carousel-next:hover {
  background: #b71c1c;   /* Darker red on hover */
  color: #fff;
}

/* Carousel Styles */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Background video replaces slides */
.carousel-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Cover hero fully in both directions (16:9):
       - Use vw-based size to stretch sideways
       - Fallback to vh-based min-size to avoid pillarboxing on tall viewports */
    width: 100vw;
    height: 56.25vw;   /* 100 * 9/16 */
    min-width: 177.78vh; /* 100 * 16/9 */
    min-height: 100vh;
    object-fit: cover;
    z-index: 1;
    pointer-events: none; /* prevent YT UI hover revealing edges */
}

.carousel-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
}

.carousel-nav {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    z-index: 2;
}

.carousel-share {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-size: 14px;
}

.carousel-share:hover {
  background: rgba(255, 255, 255, 0.2);
}

.carousel-cta {
  background: #e63946;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.carousel-cta:hover {
  background: #d32f2f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.5);
}

.carousel-cta i {
  font-size: 0.9rem;
}

.carousel-prev,
.carousel-next {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.carousel-count {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.carousel-headline {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-headline span {
    color: #e63946;
}

.carousel-cta {
    background: #e63946;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.carousel-cta:hover {
    background: #c1121f;
}

.carousel-share {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.carousel-share:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* --- Category Tabbed Carousel Styles --- */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #eee;
}
.category-tab {
  background: none;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: #222;
  padding: 0.7rem 0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  letter-spacing: 1px;
}
.category-tab.active {
  color: #e63946;
}
.category-tab.active::after {
  content: '';
  display: block;
  height: 3px;
  width: 100%;
  background: #e63946;
  border-radius: 2px 2px 0 0;
  position: absolute;
  left: 0;
  bottom: -2px;
}
.category-tab:not(.active)::after {
  content: '';
  display: block;
  height: 3px;
  width: 100%;
  background: #e0e0e0;
  border-radius: 2px 2px 0 0;
  position: absolute;
  left: 0;
  bottom: -2px;
}
.category-tab:hover:not(.active) {
  color: #e63946;
}
.category-carousel-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 2;
  padding: 0;
}

.carousel-arrow span {
  display: block;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  margin-top: -4px;
  transform: translateY(0);
}

.carousel-arrow:hover {
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.carousel-arrow.left {
  left: -20px;
}

.carousel-arrow.right {
  right: -20px;
}

.category-carousel {
  overflow: hidden;
  flex: 1;
  position: relative;
}
.carousel-products {
  display: none;
  flex-wrap: nowrap;
  gap: 1.5rem;
  transition: transform 0.4s cubic-bezier(.4,1.3,.6,1);
  will-change: transform;
}
.carousel-products.active {
  display: flex;
}
.category-card {
  min-width: 220px;
  max-width: 240px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 1.2rem 1rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.2s;
}
.category-card:hover {
  box-shadow: 0 4px 16px rgba(44,101,146,0.13);
}
.category-img {
  width: 100%;
  height: 120px;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.3rem 0;
}
.category-content p {
  font-size: 0.97rem;
  color: #555;
  margin: 0;
}
@media (max-width: 900px) {
  .category-card {
    min-width: 170px;
    max-width: 180px;
    padding: 0.7rem 0.5rem 0.7rem 0.5rem;
  }
  .category-img {
    height: 80px;
  }
}
@media (max-width: 600px) {
  .category-tabs {
    gap: 1.1rem;
    font-size: 0.97rem;
  }
  .category-card {
    min-width: 130px;
    max-width: 140px;
    padding: 0.5rem 0.2rem 0.5rem 0.2rem;
  }
  .category-img {
    height: 60px;
  }
}
/* --- End Category Tabbed Carousel Styles --- */

/* Bigger Category Card Styles for Tabbed Carousel */
.category-card {
  min-width: 270px;
  max-width: 300px;
  padding: 1.7rem 1.3rem 1.3rem 1.3rem;
}
.category-img {
  height: 170px;
}
.category-content h3 {
  font-size: 1.25rem;
}
.category-content p {
  font-size: 1.08rem;
}
.carousel-products {
  gap: 2.2rem;
}
@media (max-width: 900px) {
  .category-card {
    min-width: 200px;
    max-width: 220px;
    padding: 1.1rem 0.7rem 1.1rem 0.7rem;
  }
  .category-img {
    height: 110px;
  }
}
@media (max-width: 600px) {
  .category-card {
    min-width: 150px;
    max-width: 160px;
    padding: 0.7rem 0.3rem 0.7rem 0.3rem;
  }
  .category-img {
    height: 70px;
  }
}

/* Carousel sliding window for 3 visible cards */
.category-carousel {
  overflow: hidden;
  position: relative;
  width: 100%;
}
.carousel-products {
  width: 100%;
  position: relative;
  overflow: visible;
  padding: 0;
}
.carousel-products-inner {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-start;
  transition: transform 0.5s cubic-bezier(.4,1.3,.6,1);
  will-change: transform;
}
.carousel-products-inner.few-cards {
  justify-content: center;
}
.category-card {
  flex: 0 0 calc((100% - 4.5rem) / 4);
  max-width: calc((100% - 4.5rem) / 4);
  min-width: 0;
  box-sizing: border-box;
}
/* Hide scrollbars */
.carousel-products-inner::-webkit-scrollbar {
  display: none;
}
.carousel-products-inner {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
/* Ensure only 3 cards are visible at a time */
.carousel-products {
  min-height: 340px;
}
@media (max-width: 900px) {
  .carousel-products-inner {
    gap: 1.1rem;
  }
}
@media (max-width: 600px) {
  .carousel-products-inner {
    gap: 0.5rem;
  }
}

/* --- Carousel: 4 cards per view, centered, no cut-off --- */
.category-carousel {
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}
.carousel-products {
  width: 100%;
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 340px;
}
.carousel-products-inner {
  display: flex;
  justify-content: center;
  transition: transform 0.5s cubic-bezier(.4,1.3,.6,1);
  will-change: transform;
  gap: 1.5rem;
}
.category-card {
  flex: 0 0 calc((100% - 4.5rem) / 4); /* 4 cards, 3 gaps of 1.5rem */
  max-width: calc((100% - 4.5rem) / 4);
  min-width: 0;
  box-sizing: border-box;
}
@media (max-width: 1100px) {
  .category-card {
    flex: 0 0 calc((100% - 3rem) / 4);
    max-width: calc((100% - 3rem) / 4);
  }
  .carousel-products-inner {
    gap: 1rem;
  }
}
@media (max-width: 900px) {
  .category-card {
    flex: 0 0 calc((100% - 2rem) / 2);
    max-width: calc((100% - 2rem) / 2);
  }
  .carousel-products-inner {
    gap: 1rem;
  }
}
@media (max-width: 600px) {
  .category-card {
    flex: 0 0 90%;
    max-width: 90%;
  }
  .carousel-products-inner {
    gap: 0.5rem;
  }
}
/* --- Red Carousel Nav Buttons --- */
.carousel-arrow {
  background: #e63946;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}
.carousel-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.carousel-arrow:hover:not(:disabled) {
  background: #b71c1c;
  color: #fff;
}

/* --- Product Card Image Overlay: In Stock & Price --- */
.category-img {
  position: relative;
}
.category-img-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.7rem 0.4rem 0.7rem;
  width: 100%;
  pointer-events: none;
  z-index: 2;
}
.in-stock-ping {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 200, 81, 0.1);
  color: #000;
  border-radius: 1rem;
  font-size: 0.9rem;
  border: none;
  font-weight: 400;
  text-shadow: none;
  box-shadow: none;
}

.in-stock-ping.out-of-stock {
  background: rgba(255, 68, 68, 0.1);
  color: #000;
}

.ping-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00C851;
  margin-right: 6px;
  border: none;
  box-shadow: none;
  display: inline-block;
}

.out-of-stock .ping-dot {
  background: #ff4444;
}

.product-price {
  font-size: 1.08rem;
  color: #fff;
  background: #e63946;
  border-radius: 12px;
  padding: 2px 12px 2px 8px;
  font-weight: 700;
  box-shadow: 0 1px 4px #0002;
  text-shadow: 0 1px 2px #0008;
  display: flex;
  align-items: center;
  gap: 2px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    min-height: 500px;
}

.product-img {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e63946;
    margin-bottom: 1rem;
}

.product-description {
    color: #666;
    font-size: 0.93rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
    flex-grow: 1;
    max-height: 3.9em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .product-card {
        min-height: 450px;
    }
    
    .product-img {
        height: 300px;
    }
}

@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .product-card {
        min-height: 400px;
    }
    
    .product-img {
        height: 250px;
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-card {
        min-height: 350px;
    }
    
    .product-img {
        height: 200px;
    }
}

.no-products-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 60px 0 60px 345px;
    max-width: 700px;
    min-height: 400px;
    position: relative;
}

.no-products-found .no-products-icon {
    width: 140px;
    height: 140px;
    margin-bottom: 30px;
    opacity: 0.4;
    filter: grayscale(0.5);
}

.no-products-found h3 {
    font-size: 28px;
    color: #666;
    margin-bottom: 15px;
    opacity: 0.7;
    font-weight: 600;
}

.no-products-found p {
    color: #888;
    margin-bottom: 30px;
    opacity: 0.7;
    font-size: 18px;
    line-height: 1.5;
    max-width: 400px;
}

.reset-filters-btn {
    background-color: #e63946;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    opacity: 0.9;
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.2);
}

.reset-filters-btn:hover {
    background-color: #c1121f;
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

@media (max-width: 768px) {
    .no-products-found {
        margin: 40px auto;
        padding: 60px 30px;
        min-height: 350px;
    }

    .no-products-found .no-products-icon {
        width: 120px;
        height: 120px;
        margin-bottom: 25px;
    }

    .no-products-found h3 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .no-products-found p {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .reset-filters-btn {
        padding: 12px 24px;
    }
}

.carousel-products-inner.few-cards {
  justify-content: center !important;
}

.carousel-products-inner.few-cards,
.carousel-products-inner:only-child,
.carousel-products-inner:not(:has(.category-card ~ .category-card ~ .category-card ~ .category-card)) {
  justify-content: center !important;
}

/* Profile Section Styles - New Layout */

.profile-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.profile-form-container {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.profile-form {
    padding: 0;
}

.form-row {
    margin-bottom: 1.5rem;
}

.form-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--light-gray);
}

.form-section h4 {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h4::before {
    content: "🏠";
    font-size: 1.2rem;
}

/* Form Groups */
.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--input-bg);
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
    transform: translateY(-1px);
}

.form-control:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: default;
    position: relative;
}

/* Tooltip for disabled fields */
.form-control:disabled[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-control:disabled[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-bottom-color: #333;
    z-index: 1001;
}

/* Tooltip for disabled date selects */
.date-select:disabled[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.date-select:disabled[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-bottom-color: #333;
    z-index: 1001;
}

.form-control::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Tooltip for disabled fields */
.form-control:disabled[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-control:disabled[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-bottom-color: #333;
    z-index: 1001;
}

/* Tooltip for disabled date selects */
.date-select:disabled[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.date-select:disabled[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-bottom-color: #333;
    z-index: 1001;
}

/* Email Display */
.email-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
    min-height: 48px;
}

.masked-email {
    font-family: 'Montserrat', monospace;
    color: var(--dark-gray);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.8;
    /* Make masked email unclickable and unselectable by default */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    cursor: default;
}

.masked-email[data-is-visible="true"] {
    background-color: rgba(230, 57, 70, 0.05);
    color: var(--primary);
    font-weight: 600;
    opacity: 1;
    border: 1px solid rgba(230, 57, 70, 0.2);
    /* When visible, make it selectable and clickable for copying */
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    pointer-events: auto;
    cursor: text;
}

.masked-email[data-is-visible="true"]:hover {
    background-color: rgba(230, 57, 70, 0.1);
    border-color: rgba(230, 57, 70, 0.4);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-link:hover {
    background-color: rgba(230, 57, 70, 0.1);
    text-decoration: underline;
}

/* Username Display */
.username-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username-display .form-control {
    flex: 1;
}

.username-display .btn-link.disabled {
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.username-display .btn-link.disabled:hover {
    background-color: transparent;
    text-decoration: none;
}

.username-display .cancel-btn {
    color: #6c757d;
    font-size: 0.9rem;
}

.username-display .cancel-btn:hover {
    color: #495057;
    background-color: rgba(108, 117, 125, 0.1);
}

/* Phone Display */
.phone-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
    min-height: 48px;
}

.phone-number-display {
    color: var(--dark-gray);
    font-style: italic;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.radio-option label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
}

/* Date Group */
.date-group {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 0.75rem;
}

.date-select {
    padding: 10px 12px;
    border: 2px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

/* Profile Image Container */
.profile-image-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.profile-image-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.2);
    transition: all 0.3s ease;
}

.profile-image-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(230, 57, 70, 0.3);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-image-wrapper:hover .image-overlay {
    opacity: 1;
}

.btn-image-upload {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.btn-image-upload:hover {
    background: var(--button-hover);
    transform: scale(1.1);
}

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

.btn-link-primary {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-link-primary:hover {
    background-color: rgba(230, 57, 70, 0.1);
    text-decoration: underline;
}

.file-info {
    margin-top: 0.5rem;
}

.file-info small {
    display: block;
    color: var(--dark-gray);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Profile Stats */
.profile-stats {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Order History Card */
.order-history-card {
    margin-top: 2rem;
    grid-column: 1 / -1;
}

/* Profile Buttons */
.profile-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--light-gray);
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--button-hover) 100%);
    color: var(--button-text);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

/* Form Text */
.form-text {
    font-size: 0.85rem;
    color: var(--dark-gray);
    margin-top: 0.25rem;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .profile-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .profile-image-container {
        position: static;
        order: -1;
    }
    
    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .profile-form-container,
    .profile-image-container {
        padding: 1.5rem;
    }
    
    .profile-image-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .date-group {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .profile-buttons {
        flex-direction: column;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .profile-form-container,
    .profile-image-container {
        padding: 1rem;
    }
    
    .profile-image-wrapper {
        width: 100px;
        height: 100px;
        border-width: 3px;
    }
    
    .form-control,
    .email-display,
    .phone-display {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

.cart-tab .cart-empty {
    text-align: center;
    color: #888;
    padding: 24px 0 18px 0;
}
.cart-tab .cart-empty img {
    width: 60px;
    margin-bottom: 10px;
    opacity: 0.7;
}
.cart-tab .cart-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Loading Spinner Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

.loading-text {
    color: var(--primary);
    font-size: 16px;
    font-weight: 600;
    margin-top: 16px;
    letter-spacing: 0.5px;
}

.loading-dots {
    display: inline-block;
    animation: loadingDots 1.5s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loadingPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes loadingDots {
    0%, 20% { color: transparent; text-shadow: 0.25em 0 0 transparent, 0.5em 0 0 transparent; }
    40% { color: var(--primary); text-shadow: 0.25em 0 0 transparent, 0.5em 0 0 transparent; }
    60% { text-shadow: 0.25em 0 0 var(--primary), 0.5em 0 0 transparent; }
    80%, 100% { text-shadow: 0.25em 0 0 var(--primary), 0.5em 0 0 var(--primary); }
}

/* Button Loading State */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

/* Dashboard Loading Specific */
.dashboard-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    /* Transition removed to prevent second spinner appearance */
}

.dashboard-loading.show {
    opacity: 1;
    visibility: visible;
}

.dashboard-spinner {
    text-align: center;
    /* Animation removed to prevent second spinner appearance */
}

.dashboard-spinner .spinner {
    width: 80px;
    height: 80px;
    border-width: 6px;
    border-color: #f3f3f3;
    border-top-color: var(--primary);
}

.dashboard-spinner .loading-text {
    font-size: 18px;
    margin-top: 24px;
    color: var(--primary);
}

@keyframes dashboardEntrance {
    0% { 
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    100% { 
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ===== RETRACTABLE SIDEBAR STYLES ===== */

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Retractable Sidebar */
.retractable-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.retractable-sidebar.active {
    left: 0;
}

/* Sidebar Header */
.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
}

.sidebar-header h3 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sidebar-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Sidebar Content */
.sidebar-content {
    padding: 0; /* items should fill the width */
    background: transparent;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 2rem;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 1rem 0;
    background: transparent;
    display: flex;
    flex-direction: column; /* vertical order */
    height: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
}

.sidebar-nav li {
    margin: 0;
    background: transparent;
    width: 100%;
}

.sidebar-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
    position: relative;
    border-left: 3px solid transparent;
    background: transparent;
    box-sizing: border-box;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08); /* fill full width */
    color: #ffffff;
    border-left-color: #e63946;
    transform: translateX(5px);
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-left-color: #e63946;
}

.sidebar-link i {
    font-size: 1.2rem;
    width: 24px;
    margin-right: 1rem;
    text-align: center;
}

.sidebar-link span {
    font-size: 1rem;
    font-weight: 500;
}

/* Sidebar Toggle Button - vertical curved tab */
.sidebar-toggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #e63946 0%, #c1121f 100%);
    border: none;
    color: #ffffff;
    cursor: pointer;
    z-index: 997;
    border-radius: 0 16px 16px 0; /* curved right side */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: transform 220ms cubic-bezier(.2,.7,.2,1), box-shadow 220ms ease, background 220ms ease;
    width: 48px;
    height: 168px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    outline: none;
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, #d9313f 0%, #a90f1c 100%);
    transform: translateY(-50%) translateX(4px);
    box-shadow: 0 10px 24px rgba(0,0,0,.22);
}

.toggle-icon {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.toggle-text {
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: .5px;
}

.toggle-icon i {
    font-size: 16px;
    transition: transform 220ms ease;
}

.sidebar-toggle:hover .toggle-icon i {
    transform: translateX(2px) scale(1.05);
}

/* Tease animations */
@keyframes sidebarToggleTease {
    0% { transform: translateY(-50%) translateX(0); }
    30% { transform: translateY(-50%) translateX(10px); }
    60% { transform: translateY(-50%) translateX(0); }
    100% { transform: translateY(-50%) translateX(3px); }
}

.sidebar-toggle.tease {
    animation: sidebarToggleTease 900ms ease-out;
}

/* Fake peek of the sidebar (does not open fully) */
.retractable-sidebar.tease {
    transform: translateX(-96%);
}

/* Left-edge fill: matches sidebar background to avoid cut-off during peeks */
.sidebar-edge-fill {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 10px; /* thin connector to the page edge */
    height: 168px; /* match desktop tab height */
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 0 6px 6px 0; /* subtle rounding to blend */
    z-index: 996;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.sidebar-edge-fill.show { opacity: 1; }

@media (max-width: 768px) {
    .sidebar-edge-fill { height: 150px; }
}

@media (max-width: 480px) {
    .sidebar-edge-fill { height: 140px; }
}

/* Responsive Design for Sidebar */
@media (max-width: 768px) {
    .retractable-sidebar {
        width: 280px;
        left: -280px;
    }

    .sidebar-toggle { width: 44px; height: 150px; left: 0; border-radius: 0 14px 14px 0; }
    .toggle-icon i { font-size: 16px; }
}

@media (max-width: 480px) {
    .retractable-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .sidebar-toggle { width: 42px; height: 140px; left: 0; border-radius: 0 12px 12px 0; }
    
    .toggle-text { display: none; }
    
    .toggle-icon i { font-size: 16px; }
}

/* Dark theme adjustments */
[data-theme="dark"] .retractable-sidebar {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
}

[data-theme="dark"] .sidebar-header {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .sidebar-link.active {
    background: rgba(230, 57, 70, 0.15);
}

/* Light theme adjustments */
[data-theme="light"] .retractable-sidebar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sidebar-header {
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sidebar-header h3 {
    color: #333333;
    text-shadow: none;
}

[data-theme="light"] .sidebar-close {
    color: #333333;
}

[data-theme="light"] .sidebar-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sidebar-link {
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .sidebar-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
}

[data-theme="light"] .sidebar-link.active {
    background: rgba(230, 57, 70, 0.1);
    color: #000000;
}

/* Sidebar no longer scrollable - scrollbar styles removed */
