/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.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: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    color: #7B3F00;
    font-size: 1.8rem;
}

.nav-brand a {
    text-decoration: none;
    color: inherit;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #7B3F00;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    color: #64748b;
    font-size: 1.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cart-icon:hover,
.cart-icon.active {
    color: #7B3F00;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: #7B3F00;
    color: white;
}

.btn-primary:hover {
    background: #5D2F00;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: #10B981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #8B4513 0%, #5D2F00 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Featured Products */
.featured-products {
    padding: 4rem 0;
}

.featured-products h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Specific styling for home page and products page - Always 2 products per row */
.featured-products .products-grid,
.products-section .products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 450px;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
    line-height: 1.3;
    min-height: 2.6em;
}

.product-info p {
    color: #64748b;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10B981;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.product-actions .btn {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Products Section */
.products-section {
    padding: 4rem 0;
}

.products-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #1e293b;
}

.products-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #7B3F00;
    color: white;
    border-color: #7B3F00;
}

/* Ensure products page always shows 2 products per row */
.products-section .products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Cart Styles */
.cart-section {
    padding: 4rem 0;
    min-height: 60vh;
}

.cart-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.cart-items {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    flex: 1;
}

.item-details h4 {
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.item-details p {
    color: #64748b;
    font-size: 0.9rem;
}

.item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #10B981;
    margin: 0 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #f3f4f6;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0.25rem;
}

.remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.25rem;
    transition: color 0.3s ease;
    padding: 0.5rem;
    border-radius: 4px;
}

.remove-btn:hover {
    color: #dc2626;
    background: #fee2e2;
}

.cart-summary {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.summary-card h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-item.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    border-top: 2px solid #e2e8f0;
    padding-top: 1rem;
}

.checkout-btn {
.order-breakdown {
    border-top: 2px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.breakdown-item.total {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    font-size: 1.1rem;
}
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    font-size: 1.1rem;
}

/* Checkout Styles */
.checkout-section {
    padding: 4rem 0;
}

.checkout-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.checkout-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.checkout-form {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3 i {
    color: #7B3F00;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #7B3F00;
    box-shadow: 0 0 0 3px rgba(123, 63, 0, 0.1);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: #7B3F00;
}

.payment-option input[type="radio"] {
    margin: 0;
    width: auto;
}

.payment-option input[type="radio"]:checked + .checkmark {
    background: #7B3F00;
}

.payment-info {
    flex: 1;
}

.payment-info strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #1e293b;
}

.payment-info p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.payment-icons img {
    max-height: 24px;
}

.order-summary {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.order-item:last-child {
    border-bottom: none;
}

.item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: #1e293b;
}

.item-info p {
    font-size: 0.85rem;
    color: #64748b;
}

.summary-totals {
    border-top: 2px solid #e2e8f0;
    padding-top: 1rem;
}

.place-order-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

/* Success Page */
.success-section {
    padding: 6rem 0;
    text-align: center;
}

.success-content {
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    font-size: 4rem;
    color: #10B981;
    margin-bottom: 2rem;
}

.success-content h1 {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 1rem;
}

.success-content p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.order-details {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: left;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Admin Styles */
.admin-header {
    background: #1e293b;
    color: white;
    padding: 1rem 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-btn {
    background: none;
    border: 2px solid transparent;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover,
.nav-btn.active {
    background: #7B3F00;
    border-color: #7B3F00;
}

.admin-section {
    padding: 2rem 0;
    display: none;
}

.admin-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.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: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #7B3F00;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #64748b;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

tbody tr:hover {
    background: #f8fafc;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background: #fef3c7;
    color: #d97706;
}

.status-confirmed {
    background: #F3E5D0;
    color: #7B3F00;
}

.status-shipped {
    background: #F5E6D3;
    color: #5D2F00;
}

.status-delivered {
    background: #dcfce7;
    color: #16a34a;
}

.status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.action-btn {
    padding: 0.25rem 0.5rem;
    margin: 0 0.25rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.action-btn.edit {
    background: #7B3F00;
    color: white;
}

.action-btn.delete {
    background: #ef4444;
    color: white;
}

.action-btn:hover {
    transform: translateY(-1px);
}

/* Login Form */
.login-section {
    padding: 6rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-form {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1e293b;
}

/* Contact Form */
.contact-section {
    padding: 4rem 0;
}

.contact-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    height: fit-content;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item i {
    color: #7B3F00;
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.info-item h4 {
    margin-bottom: 0.25rem;
    color: #1e293b;
}

.info-item p {
    color: #64748b;
    margin: 0;
}

/* About Page */
.about-section {
    padding: 4rem 0;
}

.about-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.about-text h2 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.about-text h3 {
    color: #7B3F00;
    margin: 2rem 0 1rem 0;
}

.about-text p {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-text ul {
    list-style: none;
    margin-top: 1rem;
}

.about-text li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #64748b;
}

.about-text li i {
    color: #10B981;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: #7B3F00;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #64748b;
    line-height: 1.6;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-body {
    margin-top: 1rem;
}

.image-gallery {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 1rem;
    margin-bottom: 2rem;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.thumbnail-images {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.thumbnail {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail.active,
.thumbnail:hover {
    border-color: #7B3F00;
}

.product-video {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .btn {
    flex: 1;
}

/* Message Styles */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: none;
}

.message.success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.message.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.message.show {
    display: block;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #7B3F00;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #7B3F00;
}

.footer-section p {
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Product Stock Badge */
.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.stock-badge.in-stock {
    background: #dcfce7;
    color: #16a34a;
}

.stock-badge.out-of-stock {
    background: #fee2e2;
    color: #dc2626;
}

.product-stock {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1rem;
}

/* Enhanced Button Styles */
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    /* Keep home page and products page with 2 products per row on mobile */
    .featured-products .products-grid,
    .products-section .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Other product grids (like admin) can be single column on mobile */
    .products-grid:not(.featured-products .products-grid):not(.products-section .products-grid) {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-card {
        min-height: auto;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-info h3 {
        font-size: 1rem;
        min-height: auto;
    }
    
    .product-actions .btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .cart-content,
    .checkout-content,
    .contact-content,
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 0;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .cart-item .item-price,
    .cart-item .quantity-controls,
    .cart-item .item-total {
        margin: 0;
    }
    
    .item-image {
        width: 60px;
        height: 60px;
        align-self: flex-start;
    }
    
    .quantity-controls {
        justify-content: flex-start;
    }
    
    .remove-btn {
        align-self: flex-end;
        margin-top: 0.5rem;
    }
    
    .admin-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .admin-nav .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .admin-nav .nav-btn i {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 1rem;
    }
    
    .image-gallery {
        grid-template-columns: 1fr;
    }
    
    .thumbnail-images {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-content,
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .products-filter {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Extra small screens (400px and below) */
@media (max-width: 400px) {
    .container {
        padding: 0 10px;
    }
    
    /* Still maintain 2 products per row for home and products page */
    .featured-products .products-grid,
    .products-section .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .product-card {
        border-radius: 6px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-info {
        padding: 0.8rem;
    }
    
    .product-info h3 {
        font-size: 0.9rem;
        line-height: 1.2;
        margin-bottom: 0.3rem;
    }
    
    .product-info p {
        font-size: 0.8rem;
        line-height: 1.3;
        -webkit-line-clamp: 2;
    }
    
    .product-price {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    .product-actions .btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .featured-products h2,
    .products-section h1 {
        font-size: 2rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .product-card {
        min-height: 420px;
    }
    
    .product-info h3 {
        font-size: 1.15rem;
    }
    
    .product-actions .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
    
    .cart-content,
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .products-grid {
        gap: 2.5rem;
    }
    
    .product-card {
        min-height: 480px;
    }
    
    .product-image {
        height: 280px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #7B3F00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.hidden { display: none; }
.visible { display: block; }