/* ============================================
   MARKETHUB - MAIN STYLESHEET
   Hybrid B2C & P2P Marketplace
   ============================================ */

/* ============================================
   MARKETHUB - GLOBAL VARIABLE CONTROLS
   ============================================ */
:root {
    /* Brand Accent Colors (Extracted from your screenshot) */
    --primary-color: #667eea;       /* Main vibrant orange brand color */
    --primary-dark:  #764ba2;        /* Darker orange for hover states */
    --primary-light:  #667eea;       /* Light tint background for active items */
    --secondary-color: #cc520a;     /* Keep purple for secondary badges if needed */
    
    /* Semantic Feedback Colors */
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    
    /* Layout Interface Neutrals */
    --dark-color: #2c3e50;          /* Deep gray-blue for main headings */
    --text-main: #333333;           /* Default content prose color */
    --gray-color: #6c757d;          /* Subtitles, icons, and placeholder states */
    --gray-light: #a6a6a6;          /* Muted borders and weak text links */
    
    /* Surfaces, Containers and Background Elements */
    --bg-body: #f5f5f5;             /* Underlying window viewport backdrop */
    --bg-card: #ffffff;             /* Foreground blocks, items, panels, sidebars */
    --bg-sidebar: #f8f9fa;          /* Alternating left-hand panel wrappers */
    --light-color: #f8f9fa;         /* Standard subtle content rows highlight */
    
    /* Grid Layout Separators */
    --border-color: #dee2e6;        /* Standard line division borders */
    --border-light: #eeeeee;        /* Ultra faint borders inside cards/tables */
    
    /* Shadow Depth Definitions */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Apply global theme colors to basic elements */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* ============================================
   HEADER - COMPLETE FIXED VERSION
   ============================================ */

.header {
    background: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Logo */
.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
}

/* Search Container */
.search-container {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-form {
    display: flex;
    width: 100%;
}

.search-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 30px 0 0 30px;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.1);
}

.search-form button {
    padding: 0.6rem 1.2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--primary-dark);
}

/* Store Type Selector */
.store-type-selector {
    display: flex;
    gap: 0.5rem;
    background: var(--light-color);
    padding: 0.25rem;
    border-radius: 30px;
}

.store-type-btn {
    padding: 0.4rem 1rem;
    border: none;
    background: transparent;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.store-type-btn.active {
    background: var(--primary-color);
    color: white;
}

.store-type-btn:hover:not(.active) {
    background: #e0e0e0;
}

/* Navigation Links Container */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-link {
    text-decoration: none;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

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

/* Cart Link */
.cart-link {
    position: relative;
}

.cart-badge {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    position: absolute;
    top: -8px;
    right: -12px;
    min-width: 18px;
    text-align: center;
}

/* Chat Link */
.chat-link {
    position: relative;
}

.chat-badge {
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    position: absolute;
    top: -8px;
    right: -12px;
    min-width: 18px;
    text-align: center;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-btn {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #555;
    border-radius: 30px;
    transition: var(--transition);
}

.user-menu-btn:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 0.5rem 0;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-menu:hover .user-dropdown,
.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    text-decoration: none;
    color: #555;
    transition: var(--transition);
    font-size: 0.85rem;
}

.user-dropdown a:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.user-dropdown hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* Auth Buttons */
.auth-links {
    display: flex;
    gap: 0.75rem;
}

.btn-login, .btn-register {
    padding: 0.5rem 1rem;
    border-radius: 30px;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
}

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

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

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

.btn-register:hover {
    background: var(--primary-dark);
}

/* Mobile Menu Toggle */
/* Mobile Sidebar Additional Styles */
.mobile-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 0;
}

.mobile-store-types {
    padding: 0.5rem 0;
}

.mobile-store-types strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: #888;
}

.mobile-store-types a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.mobile-store-types a:hover {
    background: var(--light-color);
    padding-left: 1rem;
}
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #555;
    padding: 0.5rem;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100%;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-sidebar.open {
    left: 0;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
}

.mobile-sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-sidebar {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

.mobile-sidebar-content {
    padding: 1rem;
}

.mobile-sidebar-content a {
    display: block;
    padding: 0.75rem;
    text-decoration: none;
    color: #555;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.mobile-sidebar-content a:hover {
    background: var(--light-color);
    color: var(--primary-color);
    padding-left: 1.25rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* ============================================
   DESKTOP STYLES (Default - 992px and above)
   ============================================ */

@media (min-width: 992px) {
    .navbar {
        flex-wrap: nowrap;
    }
    
    .nav-links {
        display: flex !important;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
}

/* ============================================
   TABLET STYLES (768px - 991px)
   ============================================ */

@media (max-width: 991px) and (min-width: 769px) {
    .navbar {
        flex-wrap: wrap;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 0.5rem;
    }
    
    .store-type-selector {
        order: 2;
    }
    
    .nav-links {
        display: flex !important;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
}

/* ============================================
   MOBILE STYLES (768px and below)
   ============================================ */

@media (max-width: 768px) {
    .navbar {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    /* Hide desktop navigation */
    .nav-links {
        display: none !important;
    }
    
    /* Show mobile menu button */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Adjust search for mobile */
    .search-container {
        max-width: 200px;
    }
    
    .search-form input {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
    
    .search-form button {
        padding: 0.5rem 1rem;
    }
    
    /* Hide store type selector on mobile (optional) */
    .store-type-selector {
        display: none;
    }
    
    /* Logo size adjustment */
    .logo a {
        font-size: 1.2rem;
    }
    
    /* Auth buttons on mobile */
    .auth-links {
        display: none;
    }
}

/* ============================================
   SMALL MOBILE (480px and below)
   ============================================ */

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .search-container {
        max-width: 150px;
    }
    
    .search-form input {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .search-form button {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .logo a {
        font-size: 1rem;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

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

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */

.products-section {
    margin: 3rem 0;
}

/* Products Header Toolbar Container layout */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card, #ffffff);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color, #dee2e6);
    box-shadow: var(--shadow-sm, 0 2px 4px rgba(0,0,0,0.05));
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark-color, #2c3e50);
    margin: 0;
}

.products-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Segmented Button Filter Switcher Styles */
.seller-type-filter-group {
    display: inline-flex;
    background-color: var(--light-color, #f8f9fa);
    padding: 4px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #dee2e6);
}

.toolbar-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-color, #6c757d);
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition, all 0.3s ease);
    border: none;
    cursor: pointer;
}

.toolbar-filter-btn:hover {
    color: var(--primary-color, #2c7da0);
}

.toolbar-filter-btn.active {
    background-color: var(--primary-color, #2c7da0);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(44, 125, 160, 0.2);
}

/* Sort Area Options styling overrides */
.sort-options-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-options-wrapper label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-color, #2c3e50);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.toolbar-sort-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 4px;
    font-size: 0.85rem;
    background-color: var(--bg-card, #ffffff);
    color: var(--text-main, #333333);
    cursor: pointer;
    outline: none;
    transition: var(--transition, all 0.3s ease);
}

.toolbar-sort-select:focus {
    border-color: var(--primary-color, #2c7da0);
    box-shadow: 0 0 0 2px var(--primary-light, rgba(97, 165, 194, 0.2));
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .products-toolbar-controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .seller-type-filter-group {
        display: flex;
        width: 100%;
    }
    .toolbar-filter-btn {
        flex: 1;
        justify-content: center;
    }
    .sort-options-wrapper {
        justify-content: space-between;
        width: 100%;
    }
    .toolbar-sort-select {
        flex: 1;
        max-width: 70%;
    }
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-options select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.9rem;
}

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

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

/* ============================================
   PRODUCT CARD
   ============================================ */

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-info {
    padding: 1rem;
}

.vendor-name {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-description {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

.quick-add {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.quick-add:hover {
    background: var(--primary-dark);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: #555;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-link.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.product-gallery {
    background: white;
    border-radius: 10px;
    padding: 1rem;
}

.main-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 10px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-gallery {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.thumbnail-gallery img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail-gallery img:hover {
    border-color: var(--primary-color);
}

.product-info {
    background: white;
    border-radius: 10px;
    padding: 2rem;
}

.seller-info {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.seller-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.seller-corporate {
    background: var(--primary-color);
    color: white;
}

.seller-peer {
    background: var(--secondary-color);
    color: white;
}

.seller-name {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.seller-location {
    font-size: 0.8rem;
    color: #666;
}

.product-info h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* ============================================
   CART PAGE
   ============================================ */

.cart-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .cart-container,
    .checkout-container {
        grid-template-columns: 1fr;
    }
}

.cart-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow-x: auto;
}

.cart-table table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

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

.quantity-input {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--danger-color);
}

.cart-summary {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: none;
}

.free-shipping-notice {
    background: #d4edda;
    color: #155724;
    padding: 0.5rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: center;
    font-size: 0.85rem;
}

.btn-checkout {
    width: 100%;
    margin: 1rem 0;
}

.empty-cart {
    text-align: center;
    padding: 4rem;
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin: 2rem 0;
}

.checkout-form {
    background: white;
    border-radius: 10px;
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.order-items {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.order-summary {
    margin-top: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.summary-item.total {
    font-weight: bold;
    font-size: 1.1rem;
    border-top: 2px solid #eee;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.btn-place-order {
    width: 100%;
    margin-top: 1rem;
}

/* ============================================
   LOGIN / REGISTER FORMS
   ============================================ */

.auth-container {
    max-width: 500px;
    margin: 3rem auto;
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.auth-form .btn {
    width: 100%;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

/* ============================================
   BUTTONS & BADGES
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

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

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

.btn-secondary {
    background: #ddd;
    color: #333;
}

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

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.in-stock {
    color: var(--success-color);
}

.low-stock {
    color: var(--warning-color);
}

.out-of-stock {
    color: var(--danger-color);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--dark-color);
    color: white;
    margin-top: 4rem;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
}

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

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

.footer-section a {
    color: #ccc;
    text-decoration: none;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #445566;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 8px;
    color: white;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.notification-success {
    background: var(--success-color);
}

.notification-error {
    background: var(--danger-color);
}

.notification-info {
    background: var(--primary-color);
}

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

/* ============================================
   AUTOCOMPLETE
   ============================================ */

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-form {
    position: relative;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.autocomplete-item:hover {
    background: var(--light-color);
}

.autocomplete-image {
    width: 50px;
    height: 50px;
    margin-right: 1rem;
}

.autocomplete-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.autocomplete-info {
    flex: 1;
}

.autocomplete-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.autocomplete-price {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.loading-spinner {
    text-align: center;
    padding: 2rem;
}

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

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

/* ============================================
   WISHLIST BUTTON
   ============================================ */

.wishlist-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ccc;
    transition: var(--transition);
}

.wishlist-btn.active {
    color: var(--danger-color);
}

.wishlist-btn:hover {
    color: var(--danger-color);
}

/* ============================================
   FORM ERROR STYLES
   ============================================ */

input.error,
textarea.error,
select.error {
    border-color: var(--danger-color) !important;
    background-color: #fff8f8 !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }