/* ---------------------------
   GLOBAL VARIABLES & RESET
--------------------------- */
:root {
    --primary-color: #FF4E00; /* Vibrant Orange */
    --secondary-color: #2c3e50; /* Dark Navy/Charcoal */
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --bg-color: #F8F9FA; /* Very light grey */
    --accent-color: #FF4E00; /* Orange for accents */
    --accent-hover: #E84600; /* Darker orange */
    --button-hover: #E84600; /* For hover states */
    --header-bg: #2c3e50; /* Deep Navy for headers */
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #F8F9FA;
    color: #333333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ---------------------------
   NAVBAR
--------------------------- */
.navbar-container {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--header-bg);
    border-bottom: 2px solid var(--primary-color);
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
}

.navbar-logo {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-light);
    white-space: nowrap;
    flex: 0 0 auto;
}

.navbar-container input[type="text"] {
    width: 200px;
    flex-shrink: 0;
    padding: 10px 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    flex-basis: 100%;
    order: 3;
}

.navbar-container input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 78, 0, 0.2);
}

.navbar-container button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.navbar-container button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 78, 0, 0.3);
}

#nav-links {
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    flex: 1 1 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    order: 3;
    margin: 0 10px;
}

#nav-links a,
#nav-links button {
    color: var(--text-light);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

#nav-links a:hover,
#nav-links button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Cart button - positioned on left */
#cart-btn.cart-btn {
    order: 2;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff5700 100%) !important;
    color: white !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex: 0 0 auto !important;
    width: auto !important;
}

#cart-btn:hover {
    background: linear-gradient(135deg, #ff5700 0%, var(--primary-color) 100%) !important;
    transform: translateY(-2px);
}

/* Messages link - positioned on right */
#messages-link.messages-link {
    order: 4;
    margin-left: auto;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff5700 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    display: flex !important;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

#messages-link:hover {
    background: linear-gradient(135deg, #ff5700 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(255, 78, 0, 0.2);
}

#menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 12px;
    margin-left: auto;
    order: 2;
}

.menu-toggle {
    background: none !important;
    border: none !important;
    color: var(--text-light) !important;
    font-size: 1.5rem !important;
    padding: 8px 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.menu-toggle:hover {
    transform: scale(1.1) !important;
}

/* ---------------------------
   CONTAINER & HEADINGS
--------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    background-color: #F8F9FA;
    border-radius: 8px;
}

h1, h2 {
    text-align: center;
    margin: 30px 0;
    color: var(--header-bg);
}

h1 {
    text-align: center;
    color: var(--header-bg);
    margin-bottom: 30px;
    padding-top: 20px;
    font-size: 40px;
    font-weight: 800;
}

h2 {
    color: var(--header-bg);
    margin: 30px 0 20px 0;
    font-size: 28px;
    font-weight: 700;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--header-bg) 0%, #1a252f 50%, #2c3e50 100%);
    color: white;
    padding: 60px 20px 50px;
    text-align: center;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
}

.hero-section h1 {
    color: white;
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding-top: 0;
}

.hero-section .hero-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
    position: relative;
}

.hero-section .hero-cta {
    display: inline-flex;
    gap: 15px;
    position: relative;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.hero-btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 78, 0, 0.4);
}

.hero-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 78, 0, 0.5);
}

.hero-btn-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.hero-btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

/* Section styling with subtle background */
.section-alt {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    padding: 40px 0;
    margin: 0;
}

/* ---------------------------
   CATEGORY SECTION
--------------------------- */
.category-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    margin: 30px auto;
    max-width: 1200px;
    padding: 20px;
}

.category-card {
    padding: 30px 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    color: var(--header-bg);
    text-decoration: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(224, 224, 224, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    text-shadow: none;
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #ff8c42);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 0 0 16px 16px;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(255, 78, 0, 0.1);
    border-color: var(--primary-color);
    background: linear-gradient(145deg, #ffffff 0%, #fff5f0 100%);
    color: var(--primary-color);
}

.category-card:hover::after {
    transform: scaleX(1);
}

.category-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

/* ---------------------------
   PRODUCT GRID
--------------------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 20px;
}

/* Product Card - enhanced styling */
.product-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    text-align: center;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(255, 78, 0, 0.08);
    border-color: rgba(255, 78, 0, 0.15);
}

.product-card .card-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border-radius: 16px 16px 0 0;
}

.product-card .card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .card-image-wrapper img {
    transform: scale(1.08);
}

.product-card .card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary-color), #ff8c42);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 78, 0, 0.3);
    z-index: 2;
}

.product-card .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
    overflow: hidden;
}

.product-card .card-title {
    margin: 0 0 6px 0;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    min-height: 42px;
    word-wrap: break-word;
    text-align: left;
}

.product-card .card-meta {
    color: #888;
    font-size: 12px;
    margin: 0 0 10px 0;
    line-height: 1.4;
    text-align: left;
}

.product-card .card-price {
    color: var(--primary-color);
    font-size: 22px;
    font-weight: 800;
    margin: auto 0 12px 0;
    text-align: left;
}

.product-card .card-actions {
    margin-top: auto;
}

.product-card .add-to-cart-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b35 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 78, 0, 0.25);
}

.product-card .add-to-cart-btn:hover {
    background: linear-gradient(135deg, #ff6b35 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 78, 0, 0.35);
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.image-box {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f0f0f0;
}

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

.card:hover .image-box img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 10px 0;
    line-height: 1.4;
    min-height: 40px;
    word-wrap: break-word;
}

.product-meta {
    color: #666;
    font-size: 13px;
    margin: 5px 0;
    line-height: 1.4;
}

.product-price {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: bold;
    margin: 8px 0;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.details {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.title {
    font-size: 16px;
    font-weight: 600;
    color: var(--header-bg);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stars {
    font-size: 14px;
    margin-bottom: 8px;
}

.delivery {
    font-size: 12px;
    color: #27ae60;
    font-weight: 500;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    margin-top: auto;
    box-shadow: 0 2px 4px rgba(255, 78, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.add-to-cart-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 78, 0, 0.3);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

/* ---------------------------
   TABLES
--------------------------- */
.table-container,
.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: none; /* Hidden until JS renders content */
}

th, td {
    border: 1px solid #e0e0e0;
    padding: 12px;
    text-align: left;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

th {
    background-color: var(--header-bg);
    color: var(--text-light);
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f8f8f8;
}

tr:hover {
    background-color: #f0f5ff;
}

td.actions {
    text-align: center;
}

.actions button {
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.actions button:hover {
    background-color: var(--button-hover);
}

/* ---------------------------
   BUTTONS
--------------------------- */
.add-button {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.add-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 78, 0, 0.2);
}

.remove-btn {
    background-color: #dc3545;
    border: none;
    color: var(--text-light);
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

.checkout-btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    float: right;
    font-weight: bold;
}

.checkout-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 78, 0, 0.3);
}

/* ---------------------------
   INPUTS
--------------------------- */
.quantity-input {
    width: 60px;
    padding: 8px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    transition: border-color 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 6px rgba(255, 78, 0, 0.2);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 78, 0, 0.15);
}

/* ---------------------------
   FEEDBACK MESSAGES
--------------------------- */
.feedback-message {
    text-align: center;
    padding: 20px;
    font-weight: bold;
    color: var(--text-dark);
}

#loading-indicator {
    color: var(--primary-color);
}

#error-message {
    color: var(--accent-color);
}

#empty-message,
#no-products-message {
    display: none;
}

#wishlist-feedback {
    text-align: center;
    color: var(--accent-color);
    font-weight: bold;
    margin-top: 10px;
}

/* ---------------------------
   TABLE FOOTER
--------------------------- */
.total-row {
    font-weight: bold;
    background-color: #fafafa;
    font-size: 1.1rem;
}

.checkout-cell {
    padding-top: 20px !important;
    text-align: right;
}

/* ---------------------------
   RESPONSIVE NAVIGATION
--------------------------- */
@media (max-width: 768px) {
    .navbar-container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px 8px;
        gap: 8px;
        width: 100%;
        align-items: center;
    }
    
    .navbar-logo {
        font-size: 16px;
        flex: 0 0 auto;
        white-space: nowrap;
        order: 1;
    }
    
    #search-bar {
        width: 100%;
        margin: 0 !important;
        order: 5;
        flex-basis: 100%;
        margin-top: 8px !important;
    }
    
    #menu-toggle {
        display: none !important;
    }
    
    #cart-btn.cart-btn {
        order: 2;
        padding: 8px 12px;
        margin: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, #ff5700 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 6px !important;
        text-decoration: none;
        cursor: pointer;
        font-weight: 600;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
        transition: all 0.2s ease;
        min-height: 36px;
        display: flex !important;
        align-items: center !important;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(255, 78, 0, 0.2);
    }
    
    #cart-btn:hover {
        background: linear-gradient(135deg, #ff5700 0%, var(--primary-color) 100%) !important;
        box-shadow: 0 4px 10px rgba(255, 78, 0, 0.3);
        transform: translateY(-1px);
    }
    
    #messages-link.messages-link {
        order: 4;
        margin-left: auto !important;
        padding: 8px 12px;
        margin: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, #ff5700 100%);
        color: white;
        border: none;
        border-radius: 6px;
        text-decoration: none;
        cursor: pointer;
        font-weight: 600;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
        transition: all 0.2s ease;
        min-height: 36px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(255, 78, 0, 0.2);
    }
    
    #messages-link:hover {
        background: linear-gradient(135deg, #ff5700 0%, var(--primary-color) 100%);
        box-shadow: 0 4px 10px rgba(255, 78, 0, 0.3);
        transform: translateY(-1px);
    }
    
    #nav-links.secondary {
        display: flex !important;
        flex-direction: row;
        background-color: transparent;
        position: static;
        width: auto;
        padding: 0;
        margin: 0;
        z-index: 10;
        box-shadow: none;
        gap: 6px;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        min-height: auto;
        align-items: center;
        order: 3;
        flex: 1 1 auto;
    }
    
    #nav-links.secondary::-webkit-scrollbar {
        display: none;
    }
    
    #nav-links.secondary a,
    #nav-links.secondary button {
        padding: 8px 12px;
        margin: 0;
        background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
        color: var(--primary-color);
        border: 1px solid #ddd;
        border-radius: 6px;
        text-decoration: none;
        cursor: pointer;
        font-weight: 600;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
        transition: all 0.2s ease;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    #nav-links.secondary a:hover,
    #nav-links.secondary button:hover {
        background: white;
        border-color: var(--primary-color);
        box-shadow: 0 4px 8px rgba(255, 78, 0, 0.15);
        transform: translateY(-1px);
    }
}

/* ---------------------------
   HOME PAGE STYLES
--------------------------- */
.category-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    padding: 0 10px;
}

.category-card {
    background-color: #ffffff;
    padding: 14px 18px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--header-bg);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    min-width: 140px;
    flex: 1 1 calc(16.666% - 15px);
}

.category-card:hover {
    background-color: #ffffff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* ---------------------------
   PRODUCT GRID & CARD STYLES
--------------------------- */
/* Product Card */
.card {
    background-color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-6px);
}

/* Image Container */
.card .image-box {
    height: 200px;
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

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

.card:hover .image-box img {
    transform: scale(1.08);
}

.card .image-box .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 700;
}

/* Card Details */
.card .details {
    padding: 18px;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.card .details .title {
    font-size: 16px;
    color: var(--header-bg);
    margin-bottom: 10px;
    display: -webkit-box;
    display: -ms-flexbox;
    -webkit-box-orient: vertical;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-weight: 600;
}

.card .details .price {
    font-size: 22px;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.card .details .stars,
.card .details .delivery {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.card .details .add-to-cart-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    margin-top: auto;
}

.card .details .add-to-cart-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 78, 0, 0.3);
}

/* ---------------------------
   LOGIN PAGE STYLES
--------------------------- */
.login-page {
    background: linear-gradient(135deg, var(--header-bg), #1a252f);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.login-page .login-box {
    background-color: #ffffff;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-page .login-box h1 {
    color: var(--header-bg);
    font-size: 28px;
    margin-bottom: 30px;
    position: relative;
    font-weight: 800;
}

.login-page .login-box h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.login-page .login-box label {
    display: block;
    color: var(--header-bg);
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-align: left;
    font-weight: 600;
}

.login-page .login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: #ffffff;
    color: var(--header-bg);
    font-size: 14px;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    transition: all 0.3s ease;
}

.login-page .login-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 78, 0, 0.15);
}

.login-page .login-box button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.login-page .login-box button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 78, 0, 0.3);
}

.login-page .login-box .links {
    margin-top: 20px;
    font-size: 13px;
    color: var(--header-bg);
}

.login-page .login-box .links a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-page .login-box .links a:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}
/* ---------------------------
   FOOTER
--------------------------- */
.footer {
    background-color: var(--header-bg);
    color: var(--text-light);
    margin-top: 60px;
    padding: 40px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 700;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

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

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

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

/* ---------------------------
   NAV BUTTONS & CART BADGE
--------------------------- */
.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-btn {
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 12px;
    font-weight: 600;
    background-color: transparent;
    color: var(--text-light);
    white-space: nowrap;
}

.nav-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.cart-btn {
    background-color: var(--primary-color);
    color: white;
    position: relative;
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cart-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 78, 0, 0.2);
}

.cart-badge {
    background-color: #FF4E00;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 10px;
    margin-left: 3px;
    box-shadow: 0 2px 4px rgba(255, 78, 0, 0.3);
}

/* ---------------------------
   MOBILE RESPONSIVENESS
--------------------------- */

/* Tablet and smaller screens (768px and below) */
@media (max-width: 768px) {
    /* Navigation */
    .navbar-container {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px 8px;
        gap: 8px;
        position: relative;
        align-items: center;
    }

    .navbar-logo {
        font-size: 16px;
        flex: 0 0 auto;
        white-space: nowrap;
        order: 1;
    }

    #menu-toggle {
        display: none;
    }

    .navbar-container input[type="text"] {
        width: 100%;
        padding: 10px 12px;
        font-size: 13px;
        order: 4;
        flex-basis: 100%;
        margin: 8px 0 0 0;
    }
    
    .primary-nav-links {
        display: flex !important;
        flex-direction: row;
        gap: 6px;
        flex-wrap: nowrap;
        align-items: center;
        order: 2;
        flex: 1 1 auto;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 45px;
    }
    
    .primary-nav-links::-webkit-scrollbar {
        display: none;
    }
    
    .primary-nav-links a,
    .primary-nav-links button {
        padding: 10px 14px;
        margin: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, #ff5700 100%);
        color: white;
        border: none;
        border-radius: 6px;
        text-decoration: none;
        cursor: pointer;
        font-weight: 600;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
        transition: all 0.2s ease;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(255, 78, 0, 0.2);
    }
    
    .primary-nav-links a:hover,
    .primary-nav-links button:hover {
        background: linear-gradient(135deg, #ff5700 0%, var(--primary-color) 100%);
        box-shadow: 0 4px 10px rgba(255, 78, 0, 0.3);
        transform: translateY(-1px);
    }

    #nav-links.secondary {
        display: flex !important;
        flex-direction: row;
        background-color: transparent;
        position: static;
        top: auto;
        left: auto;
        right: auto;
        padding: 0;
        border-radius: 0;
        width: 100%;
        z-index: 10;
        box-shadow: none;
        margin: 0;
        gap: 6px;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        order: 3;
        flex: 1 1 100%;
        align-items: center;
        min-height: 45px;
    }

    #nav-links.secondary::-webkit-scrollbar {
        display: none;
    }

    #nav-links.secondary.active {
        display: flex !important;
    }

    #nav-links.secondary a,
    #nav-links.secondary button {
        padding: 8px 12px;
        margin: 0;
        background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
        color: var(--primary-color);
        border: 1px solid #ddd;
        border-radius: 6px;
        text-decoration: none;
        cursor: pointer;
        font-weight: 600;
        font-size: 13px;
        transition: all 0.2s ease;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        white-space: nowrap;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    #nav-links.secondary a:hover,
    #nav-links.secondary button:hover {
        background: white;
        border-color: var(--primary-color);
        box-shadow: 0 4px 8px rgba(255, 78, 0, 0.15);
        transform: translateY(-1px);
    }

    /* Category Cards */
    .category-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
        padding: 0 10px;
    }
    
    .category-card {
        min-width: 110px;
        padding: 12px 10px;
        font-size: 12px;
        min-height: 70px;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
        padding: 10px;
    }

    .card .details {
        padding: 10px;
    }

    .card .details .title {
        font-size: 13px;
    }

    .card .details .price {
        font-size: 16px;
    }

    .card .image-box {
        height: 140px;
    }

    .add-to-cart-btn {
        padding: 10px;
        font-size: 12px;
        min-height: 44px;
    }

    /* Headings */
    h1 {
        font-size: 32px;
        margin: 20px 0;
    }

    h2 {
        font-size: 24px;
        margin: 20px 0 15px 0;
    }

    /* Checkout Form */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .checkout-container {
        flex-direction: column;
        gap: 15px;
        margin: 10px;
    }

    .checkout-form,
    .order-summary {
        width: 100%;
    }

    /* Buttons */
    .btn,
    button {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 44px;
    }

    /* Footer */
    .footer {
        padding: 20px 10px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    /* Navigation */
    .navbar-container {
        display: flex;
        flex-direction: column;
        padding: 6px;
        gap: 6px;
        width: 100%;
    }

    .navbar-logo {
        font-size: 13px;
        font-weight: bold;
        margin-bottom: 4px;
    }

    #menu-toggle {
        display: none !important;
    }

    .navbar-container input[type="text"] {
        width: 100%;
        padding: 8px;
        font-size: 12px;
        border-radius: 20px;
        margin: 0;
    }

    #nav-links {
        display: flex !important;
        flex-direction: row;
        position: static;
        width: 100%;
        padding: 0;
        margin: 0;
        gap: 4px;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        min-height: 44px;
        align-items: center;
    }

    #nav-links::-webkit-scrollbar {
        display: none;
    }

    #nav-links a,
    #nav-links button {
        padding: 6px 8px;
        font-size: 10px;
        min-height: auto;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Category Cards - Better density on small screens */
    .category-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 8px;
    }
    
    .category-card {
        flex: 1 1 calc(50% - 8px);
        width: calc(50% - 8px);
        padding: 10px;
        font-size: 11px;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Headings */
    h1 {
        font-size: 22px;
        margin: 12px 0;
    }

    h2 {
        font-size: 18px;
        margin: 15px 0 10px 0;
    }

    h3 {
        font-size: 14px;
    }

    /* Product Grid - Tighter spacing */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
        padding: 6px;
    }

    .card {
        border-radius: 6px;
    }

    .card .image-box {
        height: 110px;
    }

    .card .details {
        padding: 8px;
        font-size: 11px;
    }

    .card-content {
        padding: 8px !important;
    }

    .product-name {
        font-size: 11px;
    }

    .product-price {
        font-size: 13px;
    }

    .add-to-cart-btn {
        padding: 8px;
        font-size: 11px;
        min-height: 44px;
    }

    .card .details .title {
        font-size: 11px !important;
        margin-bottom: 4px;
    }

    .card .details .price {
        font-size: 14px !important;
        margin-bottom: 4px;
    }

    .card .details .add-to-cart-btn {
        padding: 8px !important;
        font-size: 11px !important;
        width: 100%;
    }

    /* Inputs */
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="password"],
    select,
    textarea {
        padding: 10px;
        font-size: 14px;
        width: 100%;
    }

    /* Login Page */
    .login-page {
        height: auto;
        min-height: 100vh;
        padding: 15px 10px;
    }

    .login-page .login-box {
        padding: 20px;
        width: 100%;
        max-width: 100%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .login-page .login-box h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }
}

/* Landscape orientation and tall screens */
@media (max-height: 600px) and (orientation: landscape) {
    }

    /* Login Page */
    .login-page {
        height: auto;
        min-height: 100vh;
        padding: 20px 10px;
    }

    .login-page .login-box {
        padding: 25px 20px;
        width: 100%;
        max-width: 100%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .login-page .login-box h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .login-page .login-box label {
        font-size: 12px;
    }

    .login-page .login-box input {
        padding: 10px;
        margin-bottom: 12px;
        font-size: 13px;
    }

    .login-page .login-box button {
        padding: 10px;
        font-size: 14px;
    }

    .login-page .login-box .links {
        font-size: 12px;
        margin-top: 15px;
    }

    .login-page .login-box .links a {
        font-size: 11px;
    }

    /* Buttons */
    .btn,
    button {
        padding: 10px;
        font-size: 12px;
        border-radius: 6px;
        width: 100%;
    }

    .checkout-btn {
        float: none;
        width: 100%;
        margin-top: 10px;
    }

    /* Footer */
    .footer {
        padding: 15px 8px;
        margin-top: 40px;
    }

    .footer-section h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .footer-section a {
        font-size: 12px;
    }

    /* Responsive notifications */
    .notification-container {
        right: 5px;
        left: 5px;
        max-width: none;
        top: 50px;
    }
    
    .notification-toast {
        padding: 12px;
        border-radius: 6px;
    }
    
    .notification-title {
        font-size: 12px;
    }
    
    .notification-message {
        font-size: 11px;
    }
}

/* Desktop and larger screens (769px and above) */
@media (min-width: 769px) {
    /* Navigation - layout on single row */
    .navbar-container {
        flex-wrap: nowrap;
        gap: 15px;
        align-items: center;
    }

    .navbar-logo {
        flex: 0 0 auto;
        order: 1;
    }

    #cart-btn.cart-btn {
        order: 2;
        margin-left: 0;
        padding: 10px 16px;
        background: linear-gradient(135deg, var(--primary-color) 0%, #ff5700 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 6px !important;
        text-decoration: none;
        cursor: pointer;
        font-weight: 600;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
        transition: all 0.2s ease;
        min-height: 40px;
        display: flex !important;
        align-items: center !important;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(255, 78, 0, 0.2);
    }

    #cart-btn:hover {
        background: linear-gradient(135deg, #ff5700 0%, var(--primary-color) 100%) !important;
        box-shadow: 0 4px 10px rgba(255, 78, 0, 0.3);
        transform: translateY(-1px);
    }

    #nav-links.secondary {
        order: 3;
        flex: 1 1 auto;
        justify-content: flex-start;
        width: auto;
        min-height: 40px;
    }

    #nav-links.secondary a {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* ---------------------------
   CART DRAWER STYLES
--------------------------- */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.cart-drawer-overlay.active {
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: var(--header-bg);
    color: white;
}

.cart-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.cart-drawer-close {
    background: rgba(255,255,255,0.15);
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cart-drawer-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.cart-drawer-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.cart-drawer-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
}

.cart-drawer-item:last-child {
    border-bottom: none;
}

.cart-drawer-item-info {
    flex: 1;
}

.cart-drawer-item-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.cart-drawer-item-qty {
    font-size: 12px;
    color: #999;
}

.cart-drawer-item-price {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    text-align: right;
}

.cart-drawer-footer {
    border-top: 1px solid #eee;
    padding: 15px 20px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-drawer-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.cart-drawer-checkout-btn {
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b35 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 78, 0, 0.3);
}

.cart-drawer-checkout-btn:hover {
    background: linear-gradient(135deg, #ff6b35 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 20px rgba(255, 78, 0, 0.4);
    transform: translateY(-2px);
}

.cart-drawer-continue-btn {
    width: 100%;
    padding: 12px 16px;
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-drawer-continue-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b35 100%);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 78, 0, 0.2);
}

/* Mobile responsive for cart drawer */
@media (max-width: 768px) {
    .cart-drawer {
        max-width: 100%;
        width: 85%;
    }
}
    #nav-links.secondary button {
        padding: 10px 14px;
        font-size: 14px;
        min-height: 40px;
    }

    #messages-link.messages-link {
        order: 4;
        margin-left: auto !important;
        padding: 10px 16px;
        background: linear-gradient(135deg, var(--primary-color) 0%, #ff5700 100%);
        color: white;
        border: none;
        border-radius: 6px;
        text-decoration: none;
        cursor: pointer;
        font-weight: 600;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
        transition: all 0.2s ease;
        min-height: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(255, 78, 0, 0.2);
    }

    #messages-link:hover {
        background: linear-gradient(135deg, #ff5700 0%, var(--primary-color) 100%);
        box-shadow: 0 4px 10px rgba(255, 78, 0, 0.3);
        transform: translateY(-1px);
    }

    #search-bar {
        order: 5;
        flex: 0 0 auto;
        width: 200px;
        margin-left: 10px !important;
    }
}

/* Landscape mode (small devices) */
@media (max-height: 600px) and (orientation: landscape) {
    .navbar-container {
        padding: 5px 10px;
    }

    .category-products {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 5px;
    }

    .product-card {
        min-height: 280px;
    }

    .footer {
        padding: 10px;
        font-size: 12px;
    }

    .checkout-container {
        flex-direction: row;
    }

    .form-section {
        padding: 8px;
    }
}

/* Mobile hero section */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 16px 35px;
    }

    .hero-section h1 {
        font-size: 32px;
    }

    .hero-section .hero-subtitle {
        font-size: 15px;
    }

    .hero-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .category-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 12px;
    }

    .category-card {
        min-height: 90px;
        padding: 16px 10px;
        font-size: 14px;
        border-radius: 12px;
    }

    .category-icon {
        font-size: 24px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
        padding: 0 12px;
    }

    .product-card {
        min-height: 280px;
        border-radius: 12px;
    }

    .product-card .card-image-wrapper {
        height: 140px;
        border-radius: 12px 12px 0 0;
    }

    .product-card .card-title {
        font-size: 13px;
        min-height: 36px;
    }

    .product-card .card-price {
        font-size: 18px;
    }

    .product-card .add-to-cart-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    h2 {
        font-size: 22px;
        margin: 20px 0 15px 0;
    }
}

/* Print styles */
@media print {
    .navbar-container,
    .footer,
    .cart-btn,
    .remove-btn,
    .add-to-cart-btn,
    .filter-bar {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .order-card,
    .product-card {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        padding: 10px;
        margin: 10px 0;
    }
}

/* ---------------------------
   WEBSOCKET NOTIFICATIONS
--------------------------- */
.notification-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.notification-toast {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(255, 78, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    pointer-events: auto;
    animation: slideIn 0.3s ease forwards;
}

.notification-toast.show {
    opacity: 1;
    transform: translateX(0);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-toast.notification-message {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, #f9f9f9, #ffffff);
}

.notification-toast.notification-order {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, #f9f9f9, #ffffff);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    color: var(--header-bg);
    margin-bottom: 4px;
    font-size: 14px;
}

.notification-message {
    color: #555;
    font-size: 13px;
    line-height: 1.4;
}

.notification-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    font-weight: 300;
    line-height: 1;
    padding: 0;
    min-width: 24px;
    text-align: center;
    transition: color 0.2s;
}

.notification-close:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .notification-container {
        right: 8px;
        left: 8px;
        max-width: none;
        top: 60px;
    }
    
    .notification-toast {
        padding: 12px;
        border-radius: 6px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
}