/* Reset and Base Styles */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--header-height, 80px);
}

:root {
    --header-height: 80px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Prevent background scroll when mobile menu is open */
.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
    position: relative;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.nav-logo i {
    color: #e74c3c;
    margin-right: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #e74c3c;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e74c3c;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user .btn-secondary,
.admin-content .btn-secondary {
    background: transparent;
    color: #333;
    border-color: #333;
}

.admin-user .btn-secondary:hover,
.admin-content .btn-secondary:hover {
    background: #333;
    color: #fff;
}

.search-container {
    position: relative;
}

.search-container input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 25px;
    width: 250px;
    max-width: 40vw;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #e74c3c;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.cart-icon:hover {
    background-color: #f8f9fa;
}

.cart-icon i {
    font-size: 1.2rem;
    color: #333;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content */
main {
    margin-top: var(--header-height, 80px);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 70vh;
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-content {
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #e74c3c;
    color: white;
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #333;
}

.hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Featured Products */
.featured-products {
    padding: 4rem 0;
    background: white;
}

.featured-products h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.add-to-cart {
    width: 100%;
    padding: 0.8rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-to-cart:hover {
    background: #c0392b;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: #f8f9fa;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.feature-card p {
    color: #666;
}

/* Shopping Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    height: 100dvh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.cart-sidebar.open {
    right: 0;
    pointer-events: auto;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    color: #2c3e50;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 1rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: #e74c3c;
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    width: 30px;
    height: 30px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

.cart-total {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.checkout-btn {
    width: 100%;
}

/* Newsletter */
.newsletter {
    padding: 4rem 0;
    background: #2c3e50;
    color: white;
    text-align: center;
}

.newsletter h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.newsletter p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background: white;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: #e74c3c;
    width: 30px;
}

.contact-item h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #e74c3c;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #34495e;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: #e74c3c;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    opacity: 0.8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile nav: overlay drawer below fixed header, does not push content */
    .nav-menu {
        position: fixed;
        top: var(--header-height, 80px);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height, 80px));
        height: calc(100dvh - var(--header-height, 80px));
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        padding-top: 2rem;
        display: flex;
        gap: 1.5rem;
        z-index: 1001;
        pointer-events: none;
    }

    .nav-menu.active {
        left: 0;
        pointer-events: auto;
    }
    
    .hamburger {
        display: flex;
    }
    
    .search-container input {
        width: 200px;
    }
    
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* Admin Styles */
.admin-main {
    display: flex;
    min-height: calc(100vh - var(--header-height, 80px));
    min-height: calc(100dvh - var(--header-height, 80px));
}

.admin-sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
}

.menu-item {
    padding: 1rem 2rem;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-item:hover,
.menu-item.active {
    background: #34495e;
}

.menu-item i {
    width: 20px;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    background: #f8f9fa;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon { background: #3498db; }
.stat-card:nth-child(2) .stat-icon { background: #2ecc71; }
.stat-card:nth-child(3) .stat-icon { background: #e74c3c; }
.stat-card:nth-child(4) .stat-icon { background: #f39c12; }

.stat-info h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Upload Styles */
.upload-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.upload-method {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
}

.upload-method:hover,
.upload-method.active {
    border-color: #e74c3c;
    transform: translateY(-2px);
}

.upload-method i {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.upload-method h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.upload-section {
    display: none;
}

.upload-section.active {
    display: block;
}

.upload-zone,
.image-drop-zone {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.upload-zone:hover,
.image-drop-zone:hover {
    border-color: #e74c3c;
    background: #f8f9fa;
}

.upload-zone i,
.image-drop-zone i {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.upload-zone h3,
.image-drop-zone h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.upload-instructions {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.upload-instructions h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.upload-instructions ul {
    margin-bottom: 1.5rem;
}

.upload-instructions li {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Form Styles */
.product-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Table Styles */
.inventory-table-container,
.orders-table-container {
    background: white;
    border-radius: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.inventory-table,
.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.inventory-table th,
.orders-table th {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.inventory-table th,
.inventory-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.inventory-table th.select-col {
    width: 48px;
    text-align: center;
}

.inventory-table td:first-child {
    width: 48px;
    text-align: center;
}

.inventory-table td:first-child input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.inventory-actions .btn-danger {
    background: #e74c3c;
    border: none;
}

.inventory-actions .btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.inventory-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.inventory-actions .btn {
    flex: 0 0 auto;
}

.inventory-table td,
.orders-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.inventory-table tr:hover,
.orders-table tr:hover {
    background: #f8f9fa;
}


.product-image-small {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active { background: #d4edda; color: #155724; }
.status-inactive { background: #f8d7da; color: #721c24; }
.status-draft { background: #fff3cd; color: #856404; }

.action-btn {
    padding: 0.3rem 0.8rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    transition: background 0.3s ease;
}

.btn-edit { background: #3498db; color: white; }
.btn-delete { background: #e74c3c; color: white; }
.btn-view { background: #2ecc71; color: white; }

.action-btn:hover {
    opacity: 0.8;
}

/* Controls */
.inventory-controls,
.orders-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-bar {
    display: flex;
    gap: 0.5rem;
}

.search-bar input {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    width: 300px;
}

.inventory-actions,
.order-filters {
    display: flex;
    gap: 1rem;
}

/* Shop Controls */
.shop-controls {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
}

.controls-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    min-width: 150px;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.8rem;
    border: 2px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    border-color: #e74c3c;
    background: #e74c3c;
    color: white;
}

/* Condition Tabs */
.condition-tabs {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.condition-tab {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.2s ease;
}

.condition-tab.active,
.condition-tab:hover {
    border-color: #e74c3c;
    background: #e74c3c;
    color: white;
}

/* Checkout Form */
.checkout-form {
    max-width: 500px;
}

.checkout-form .form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.checkout-form .form-section:last-child {
    border-bottom: none;
}

.checkout-form h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.checkout-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkout-form input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.order-summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
}

.total-line {
    border-top: 2px solid #ddd;
    padding-top: 1rem;
    margin-top: 1rem;
    text-align: right;
}

@media (max-width: 768px) {
    .admin-main {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
    
    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        overflow-x: visible;
        padding: 0.5rem 0.75rem 0.75rem;
        gap: 0.5rem;
    }
    
    .menu-item {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
        white-space: normal;
        padding: 0.75rem;
        justify-content: center;
        text-align: center;
    }
    
    .menu-item span {
        font-size: 0.9rem;
    }
    
    .upload-options {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .controls-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filters {
        flex-wrap: wrap;
        gap: 1rem;
        width: 100%;
    }
    
    .filter-group {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 120px;
    }
    
    .filter-group select {
        width: 100%;
        min-width: 0;
    }
    
    .view-toggle {
        align-self: flex-start;
    }
    
    .condition-tabs {
        flex-wrap: wrap;
    }
    
    .inventory-controls,
    .orders-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .search-bar input {
        width: 100%;
        max-width: none;
    }
    
    /* Product grid on mobile */
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .product-card {
        margin-bottom: 0;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .product-description {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Product modal on mobile */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-body > div {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Page header on mobile */
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    /* Shop controls padding */
    .shop-controls {
        padding: 1rem 0;
    }
    
    /* Checkout form on mobile */
    .checkout-form .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Inventory table styles */
    .inventory-table,
    .orders-table {
        min-width: 700px;
    }

    .inventory-actions {
        justify-content: flex-start;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .inventory-actions .btn {
        flex: 0 0 auto;
    }

    #selectAllProducts {
        width: 20px;
        height: 20px;
    }

    .inventory-table td:first-child,
    .inventory-table th.select-col {
        width: 56px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .admin-content {
        padding: 1rem;
    }
    
    .admin-sidebar {
        padding: 1rem 0.5rem;
    }
    
    .sidebar-menu {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        padding: 0.25rem 0.75rem 0.75rem;
        gap: 0.5rem;
    }
    
    .menu-item {
        flex: 1 1 100%;
        min-width: 0;
        padding: 0.75rem 1rem;
    }
    
    .menu-item span {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    /* Extra small screen product grid */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    /* Nav search container on small screens */
    .nav-icons {
        gap: 0.5rem;
    }
    
    .search-container {
        display: none;
    }
    
    .nav-logo h1 {
        font-size: 1.2rem;
    }
    
    /* Filter groups stack fully on very small screens */
    .filter-group {
        flex: 1 1 100%;
    }
    
    .filters .btn-secondary {
        width: 100%;
    }
    
    /* Page header sizing */
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
    
    /* Hero section on small screens */
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* Inventory action buttons */
    .inventory-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .inventory-actions .btn {
        width: 100%;
    }
    
    /* Product actions in cards */
    .product-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .product-actions .add-to-cart {
        width: 100%;
    }
}
