/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

:root {
    --primary-brown: #2d8659;
    --secondary-brown: #3da872;
    --light-brown: #5bc98a;
    --dark-brown: #1e5c3e;
    --cream: #f0fdf4;
    --white: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray: #CCCCCC;
    --gray-dark: #666666;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--gray-light);
    overflow-x: hidden;
    max-width: 100vw;
}

.container {
    max-width: 1090px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    background-color: var(--primary-brown);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    overflow-x: hidden;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    margin-right: 10px;
}

@media (max-width: 480px) {
    .logo-img {
        height: 40px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--cream);
}

.btn-login, .btn-register {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background-color: var(--secondary-brown);
}

.btn-login:hover, .btn-register:hover {
    background-color: var(--light-brown);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 500px);
    padding: 0.5rem 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-brown), var(--secondary-brown));
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-brown);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--dark-brown);
}

.btn-secondary {
    background-color: var(--secondary-brown);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--light-brown);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: var(--success);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: var(--danger);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: var(--warning);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: var(--info);
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 2rem auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-brown);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-brown);
}

.form-footer {
    text-align: center;
    margin-top: 0.5rem;
}

.error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--gray-dark);
    margin-top: 0.25rem;
    display: block;
}

/* Grids */
.categories-grid, .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 0.5rem;
    margin: 2rem 0;
}

.category-card, .product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.category-card:hover, .product-card:hover {
    transform: translateY(-5px);
}

.category-card img, .product-card img {
    width: 80%;
    height: 200px;
    object-fit: contain;
    display: block;
    margin: 1rem auto 0;
}

.category-placeholder, .product-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
    font-size: 4rem;
}

.category-card h3, .product-card h3 {
    padding: 1rem;
    color: var(--dark-brown);
}

.category-card p, .product-card p {
    padding: 0 1rem 1rem;
    color: var(--gray-dark);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    max-height: 3.5rem;
    min-height: 3.5rem;
}

.product-price {
    font-size: 0.25rem;
    font-weight: bold;
    color: var(--primary-brown);
    padding: 0 1rem;
    margin-bottom: 0.1rem;
}

.product-card .add-to-cart-form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0 1rem 1rem;
}

.product-card .add-to-cart-form .quantity-group {
    margin-top: auto;
}

.product-card .add-to-cart-form .btn-block {
    margin-top: 0.1rem;
}

.category-card .btn, .product-card .btn {
    margin: 1rem 0 0;
}

/* Slideshow */
.slideshow-section {
    margin: 2rem 0;
}

.slideshow {
    position: relative;
    max-width: 800px;
    height: 400px;
    margin: 2rem auto;
    overflow: hidden;
    border-radius: 8px;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slideshow-controls {
    text-align: center;
    margin-top: 1rem;
}

.slideshow-controls button {
    background-color: var(--primary-brown);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.5rem;
}

.slideshow-controls button:hover {
    background-color: var(--dark-brown);
}

/* Tables */
.orders-table, .admin-table, .products-table {
    width: 100%;
    background: var(--white);
    border-collapse: collapse;
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.orders-table th, .admin-table th, .products-table th {
    background-color: var(--primary-brown);
    color: var(--white);
    padding: 1rem;
    text-align: left;
}

.orders-table td, .admin-table td, .products-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray);
}

.orders-table tfoot .total-row {
    background-color: var(--gray-light);
    font-weight: bold;
}

.text-right {
    text-align: right;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-lg {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

.badge-nou {
    background-color: var(--info);
    color: var(--white);
}

.badge-in_procesare {
    background-color: var(--warning);
    color: #333;
}

.badge-finalizat {
    background-color: var(--success);
    color: var(--white);
}

.badge-anulat {
    background-color: var(--gray-dark);
    color: var(--white);
}

.badge-success {
    background-color: var(--success);
    color: var(--white);
}

.badge-danger {
    background-color: var(--danger);
    color: var(--white);
}

.badge-warning {
    background-color: var(--warning);
    color: #333;
}

.badge-info {
    background-color: var(--info);
    color: var(--white);
}

/* Dashboard */
.dashboard-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-brown);
    margin-bottom: 0.5rem;
}

/* Admin */
.admin-nav {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-actions {
    margin-bottom: 2rem;
}

.admin-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 800px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.preview-image {
    max-width: 300px;
    margin-top: 1rem;
    border-radius: 4px;
}

/* Gallery */
.gallery-grid, .gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item img, .gallery-admin-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.gallery-admin-item {
    position: relative;
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Order */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.order-info {
    background: var(--gray-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.factura-box {
    background: var(--cream);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 4px solid var(--primary-brown);
}

.order-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.order-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-order-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.action-box {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.action-box .success-message {
    color: var(--success);
    font-weight: 600;
    padding: 0.5rem;
    background-color: #d4edda;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.action-box .info-message {
    color: #856404;
    font-weight: 600;
    padding: 0.5rem;
    background-color: #fff3cd;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Order Form */
.category-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.products-list {
    margin-top: 1rem;
}

.product-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--gray);
}

.product-info {
    flex: 1;
}

.product-quantity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
}

/* Location */
.map-container, .map-preview {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.location-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.info-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* About */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.about-text {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-info {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-item {
    margin-bottom: 1.5rem;
}

.cta-box {
    background: var(--cream);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin: 2rem 0;
}

.cta-section {
    background: linear-gradient(135deg, var(--secondary-brown), var(--light-brown));
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 8px;
    margin: 3rem 0;
}

/* Error Pages */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--primary-brown);
}

.error-page h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background-color: var(--dark-brown);
    color: var(--cream);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--white);
    border-radius: 8px;
    margin: 2rem 0;
}

.breadcrumb {
    padding: 1rem 0;
    color: var(--gray-dark);
}

.breadcrumb a {
    color: var(--primary-brown);
    text-decoration: none;
}

/* ============= MOBILE MENU STYLES ============= */

/* Hamburger menu button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--white);
    transition: all 0.3s;
    border-radius: 2px;
}

.hamburger:hover span {
    background-color: var(--cream);
}

/* Mobile sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 260px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
}

.mobile-sidebar.active {
    left: 0;
}

.sidebar-header {
    background-color: var(--primary-brown);
    color: var(--white);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
}

.sidebar-content {
    padding: 1rem 0;
}

.sidebar-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

.sidebar-link:hover {
    background-color: var(--gray-light);
    border-left-color: var(--primary-brown);
}

.sidebar-divider {
    margin: 1rem 0;
    border: none;
    border-top: 1px solid var(--gray);
}

/* Sidebar dropdowns */
.sidebar-section {
    margin: 0.5rem 0;
}

.sidebar-dropdown-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    transition: background-color 0.2s;
}

.sidebar-dropdown-btn:hover {
    background-color: var(--gray-light);
    border-left-color: var(--primary-brown);
}

.sidebar-dropdown {
    background-color: #f9f9f9;
    border-left: 3px solid var(--light-brown);
}

.loading-categories {
    padding: 1rem 1.25rem;
    color: var(--gray-dark);
    font-style: italic;
}

/* Category items in sidebar */
.sidebar-category {
    margin-bottom: 0.25rem;
}

.sidebar-category-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-brown);
    transition: background-color 0.2s;
}

.sidebar-category-btn:hover {
    background-color: #f0f0f0;
}

.sidebar-products {
    background-color: #fff;
    padding-left: 1rem;
}

.sidebar-product-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 1.5rem;
    color: #555;
    text-decoration: none;
    font-size: 0.875rem;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.sidebar-product-link:hover {
    background-color: var(--gray-light);
    border-left-color: var(--secondary-brown);
    color: #000;
}

.sidebar-product-link .product-price {
    font-weight: 600;
    color: var(--primary-brown);
    font-size: 0.8rem;
}

.no-products {
    padding: 0.75rem 1.5rem;
    color: var(--gray-dark);
    font-style: italic;
    font-size: 0.875rem;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1001;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Product Dimensions Styles */
.dimensions-group {
    margin: 0.5rem 0;
}

.dimensions-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.standard-dimensions-info {
    background-color: #e7f3ff;
    border-left: 3px solid #2196F3;
    padding: 0.4rem 0.6rem;
    margin: 0.4rem 0;
    border-radius: 4px;
}

.standard-dimensions-info small {
    font-size: 0.85rem;
    line-height: 1.3;
    display: block;
}

.dimension-mode-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.radio-label:hover {
    background-color: var(--gray-light);
    border-color: var(--primary-brown);
}

.radio-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.dimensions-inputs, .surface-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0.5rem 0;
}

.dimension-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Responsive */
/* Tablet and Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Show hamburger menu on mobile */
    .hamburger {
        display: flex;
        order: 1;
        flex-shrink: 0;
    }
    
    /* Logo on right on mobile - prevent overflow */
    .logo {
        order: 2;
        max-width: calc(100vw - 100px);
        overflow: hidden;
    }
    
    .logo-img {
        max-height: 40px;
        width: auto;
    }
    
    .logo span {
        font-size: 1.2rem;
        white-space: nowrap;
    }
    
    /* Hide desktop navigation on mobile */
    .desktop-nav {
        display: none;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    /* Categories can stay 2 columns, but products should be 1 column on mobile */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .dashboard-actions, .admin-nav {
        flex-direction: column;
    }
    
    /* Make tables horizontally scrollable on mobile */
    .table-responsive, .admin-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0.5rem 0;
        width: 100%;
        display: block;
        max-width: 100%;
    }
    
    .orders-table, .admin-table, .products-table {
        min-width: 100%;
        width: 100%;
        font-size: 0.35rem; /* Additional 40% reduction */
        display: table;
        table-layout: auto;
    }
    
    .orders-table th, .admin-table th, .products-table th,
    .orders-table td, .admin-table td, .products-table td {
        padding: 0.25rem 0.15rem;
        font-size: 0.35rem; /* Additional 40% reduction */
        line-height: 1.0;
        word-wrap: break-word;
        vertical-align: top;
    }
    
    /* Reduce button sizes in admin tables by 50% */
    .admin-table .btn-sm {
        font-size: 0.3rem; /* 50% smaller */
        padding: 0.12rem 0.25rem;
        white-space: nowrap;
        display: inline-block;
        margin: 0.1rem 0;
    }
    
    /* Reduce badge sizes */
    .admin-table .badge {
        font-size: 0.35rem;
        padding: 0.12rem 0.2rem;
        display: inline-block;
    }
    
    /* Hide mobile-hide class on mobile */
    .mobile-hide {
        display: none !important;
    }
    
    /* Make page header more compact */
    .page-header h1 {
        font-size: 1.3rem;
    }
    
    .admin-actions {
        margin: 0.5rem 0;
    }
    
    /* Hide desktop-only columns on mobile */
    .desktop-only {
        display: none;
    }
    
    /* Show mobile details - properly styled */
    .mobile-user-details {
        display: block;
        font-size: 0.35rem;
        margin: 0.3rem 0;
        padding: 0.3rem;
        background-color: #f9f9f9;
        border-left: 2px solid var(--primary-brown);
        border-radius: 3px;
    }
    
    .mobile-detail-row {
        display: flex;
        margin: 0.15rem 0;
        line-height: 1.2;
    }
    
    .mobile-detail-row strong {
        min-width: 50px;
        font-size: 0.35rem;
    }
    
    .mobile-detail-row span {
        font-size: 0.35rem;
        word-break: break-word;
    }
    
    .orders-table th, .admin-table th, .products-table th,
    .orders-table td, .admin-table td, .products-table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Container padding adjustment */
    .container {
        padding: 0 10px;
        max-width: 100%;
    }
    
    /* Reduce product card image height and optimize card size */
    .category-card img, .product-card img {
        height: 168px; /* 140px + 20% = 168px */
    }
    
    .product-card {
        padding: 0.4rem; /* Reduced from 0.75rem */
    }
    
    .product-card h3 {
        font-size: 2.2rem; /* Doubled from 1.1rem */
        margin: 0.3rem 0; /* Reduced */
    }
    
    .product-card p {
        font-size: 1.7rem; /* Doubled from 0.85rem */
        margin: 0.2rem 0; /* Reduced */
    }
    
    .product-price {
        font-size: 2.2rem; /* Doubled from 1.1rem */
        font-weight: bold;
        margin: 0.2rem 0; /* Reduced */
    }
    
    .product-card .add-to-cart-form {
        padding: 0 0.3rem 0.3rem; /* Reduced from 0.5rem */
    }
    
    /* Form inputs in product cards */
    .product-card .form-control, 
    .product-card .dimension-input {
        font-size: 1.8rem; /* Doubled from 0.9rem */
        padding: 0.5rem;
    }
    
    .product-card .btn {
        font-size: 1.8rem; /* Doubled */
        padding: 0.8rem 1.2rem;
    }
    
    /* Optimize dimensions box - reduce height by 30% */
    .dimensions-group {
        margin: 0.2rem 0;
    }
    
    .dimensions-group label {
        font-size: 1.8rem; /* Doubled from 0.9rem */
        margin-bottom: 0.2rem;
    }
    
    .standard-dimensions-info {
        font-size: 1.5rem; /* Doubled from 0.75rem */
        padding: 0.2rem 0.3rem;
        margin: 0.2rem 0;
        line-height: 1.2;
    }
    
    .standard-dimensions-info small {
        font-size: 1.5rem; /* Doubled from 0.75rem */
        line-height: 1.2;
    }
    
    /* Keep radio buttons horizontal like desktop */
    .dimension-mode-selector {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        margin: 0.2rem 0;
    }
    
    .radio-label {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        font-size: 1.5rem; /* Doubled from 0.75rem */
        padding: 0.25rem 0.35rem;
        border-width: 1px;
        flex: 0 1 auto;
    }
    
    .radio-label input[type="radio"] {
        width: 20px; /* Increased */
        height: 20px; /* Increased */
        flex-shrink: 0;
    }
    
    .radio-label span {
        line-height: 1.1;
        white-space: nowrap;
    }
    
    /* Form inputs smaller on mobile */
    .form-control, .dimension-input {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .dimensions-inputs {
        gap: 0.5rem;
    }
    
    .dimensions-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .standard-dimensions-info {
        font-size: 0.8rem;
        padding: 0.4rem;
        margin: 0.3rem 0;
    }
}

/* Small Mobile Devices (iPhone SE, small Androids) */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 8px;
        max-width: 100%;
    }
    
    /* Single column layout for very small screens */
    .categories-grid, .products-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    /* Smaller buttons on mobile */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Reduce heading sizes */
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    /* Product cards full width and smaller on very small screens */
    .category-card, .product-card {
        max-width: 100%;
        padding: 0.3rem; /* Reduced */
    }
    
    .category-card img, .product-card img {
        height: 180px; /* 150px + 20% = 180px */
    }
    
    .product-card h3 {
        font-size: 2rem; /* Doubled from 1rem */
        margin: 0.2rem 0; /* Reduced */
    }
    
    .product-card p {
        font-size: 1.6rem; /* Doubled from 0.8rem */
        margin: 0.15rem 0; /* Reduced */
    }
    
    .product-price {
        font-size: 2.08rem; /* Doubled from 1.04rem */
    }
    
    .product-card .add-to-cart-form {
        padding: 0 0.2rem 0.2rem; /* Reduced */
    }
    
    .product-card .form-control, 
    .product-card .dimension-input {
        font-size: 1.7rem; /* Doubled from 0.85rem */
        padding: 0.4rem;
    }
    
    .product-card .btn {
        font-size: 1.6rem; /* Doubled from 0.8rem */
        padding: 0.7rem 1rem;
    }
    
    /* Further reduce dimensions box height */
    .dimensions-group {
        margin: 0.15rem 0;
    }
    
    .dimensions-group label {
        font-size: 1.6rem; /* Doubled from 0.8rem (estimated) */
    }
    
    .standard-dimensions-info {
        padding: 0.15rem 0.25rem;
        margin: 0.15rem 0;
        font-size: 1.4rem; /* Doubled from 0.7rem */
    }
    
    .standard-dimensions-info small {
        font-size: 1.4rem; /* Doubled from 0.7rem */
        line-height: 1.1;
    }
    
    /* Keep radio buttons horizontal on small screens */
    .dimension-mode-selector {
        gap: 0.2rem;
        margin: 0.15rem 0;
        flex-wrap: wrap;
    }
    
    .radio-label {
        font-size: 1.4rem; /* Doubled from 0.7rem */
        padding: 0.2rem 0.3rem;
        gap: 0.2rem;
    }
    
    .radio-label input[type="radio"] {
        width: 18px; /* Increased */
        height: 18px; /* Increased */
    }
    
    .form-control, .dimension-input {
        font-size: 0.85rem;
        padding: 0.35rem;
    }
    
    .dimensions-inputs, .surface-input {
        margin: 0.3rem 0;
    }
    
    /* Admin tables even smaller - further reduced */
    .orders-table, .admin-table, .products-table {
        font-size: 0.32rem; /* Even smaller for tiny screens */
        min-width: 100%;
        table-layout: auto;
    }
    
    .orders-table th, .admin-table th, .products-table th,
    .orders-table td, .admin-table td, .products-table td {
        padding: 0.2rem 0.12rem;
        font-size: 0.32rem;
        line-height: 1.0;
        word-wrap: break-word;
        vertical-align: top;
    }
    
    .admin-table .btn-sm {
        font-size: 0.28rem; /* 50% smaller */
        padding: 0.1rem 0.2rem;
    }
    
    .admin-table .badge {
        font-size: 0.3rem;
        padding: 0.1rem 0.18rem;
    }
    
    .mobile-user-details {
        font-size: 0.32rem;
        padding: 0.25rem;
    }
    
    .mobile-detail-row strong,
    .mobile-detail-row span {
        font-size: 0.32rem;
    }
    
    .table-responsive, .admin-table-wrapper {
        margin: 0.3rem 0;
        max-width: calc(100vw - 16px);
    }
    
    .page-header h1 {
        font-size: 1.1rem;
    }
    
    /* Mobile sidebar narrower on small screens */
    .mobile-sidebar {
        width: 240px;
        left: -240px;
    }
    
    .sidebar-link {
        padding: 0.65rem 0.85rem;
        font-size: 0.9rem;
    }
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    line-height: 1.6;
}

.cookie-content button {
    white-space: nowrap;
    padding: 0.75rem 2rem;
}

/* Admin Navigation Badges */
.badge-danger {
    background-color: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 5px;
    font-weight: bold;
}

.stat-alert {
    border: 2px solid #dc3545;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-brown);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background-color 0.3s;
}

.chat-toggle:hover {
    transform: scale(1.1);
    background-color: var(--secondary-brown);
}

.chat-toggle .unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    z-index: 999;
}

.chat-window.active {
    display: flex;
}

.chat-header {
    background-color: var(--primary-brown);
    color: white;
    padding: 1rem;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background-color: #f5f5f5;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.admin {
    align-items: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    word-wrap: break-word;
}

.chat-message.user .message-bubble {
    background-color: var(--primary-brown);
    color: white;
    border-bottom-right-radius: 5px;
}

.chat-message.admin .message-bubble {
    background-color: white;
    border: 1px solid #ddd;
    border-bottom-left-radius: 5px;
}

.message-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.25rem;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 0.5rem;
}

.chat-input-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.chat-input-container button {
    background-color: var(--primary-brown);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.chat-input-container button:hover {
    background-color: var(--secondary-brown);
}

/* Additional responsive fixes */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-content button {
        width: 100%;
    }
}


/* Table Responsive Wrappers - Added for mobile */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}

.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
