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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #1a1a1a;
    color: #fff;
    /* padding: 1rem 0; */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 24px;
}

header h1 a {
    color: #fff;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

nav a:hover {
    color: #fff;
}

.cart-link {
    background: #2563eb;
    padding: 6px 12px;
    border-radius: 4px;
    color: #fff !important;
}

main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
}

footer {
    background: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 20px;

    color: #fff;
    border-radius: 8px;
    margin-bottom: 32px;
}

.hero-section h2 {
    font-size: 36px;
    margin-bottom: 12px;
}

.hero-section p {
    font-size: 18px;
    opacity: 0.9;
}

/* Categories Section */
.categories-section {
    margin-bottom: 48px;
}

.categories-section h3 {
    margin-bottom: 20px;
    font-size: 24px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.category-card h4 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.category-card p {
    color: #666;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Products Section */
.products-section {
    margin-bottom: 48px;
}

.products-section h3 {
    margin-bottom: 20px;
    font-size: 24px;
}

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

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.product-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-container.large {
    height: 400px;
}

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

.product-image-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

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

.product-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.product-image-placeholder.large {
    height: 100%;
}

.product-info {
    padding: 16px;
}

.product-info h4 {
    margin-bottom: 8px;
    font-size: 18px;
}

.product-info h4 a {
    color: #1a1a1a;
    text-decoration: none;
}

.product-info h4 a:hover {
    color: #2563eb;
}

.product-category {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 8px;
}

.product-category-badge {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.product-category-badge a {
    color: #2563eb;
    text-decoration: none;
}

.product-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    min-height: 40px;
}

.product-description-full {
    margin: 24px 0;
}

.product-description-full h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.product-detailed-description {
    margin: 32px 0;
    padding: 24px;
    background: #f9fafb;
    border-radius: 8px;
}

.product-detailed-description h4 {
    margin-bottom: 16px;
    font-size: 20px;
    color: #1a1a1a;
}

.product-detailed-description-fullwidth {
    margin-top: 48px;
    padding: 32px;
    background: #f9fafb;
    border-radius: 8px;
    width: 100%;
}

.product-detailed-description-fullwidth h4 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 600;
}

.product-detailed-description-fullwidth {
    margin-top: 48px;
    padding: 32px;
    background: #f9fafb;
    border-radius: 8px;
    width: 100%;
    grid-column: 1 / -1;
}

.product-detailed-description-fullwidth h4 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 600;
}

.detailed-description-content {
    line-height: 1.8;
    color: #374151;
}

.detailed-description-content p {
    margin-bottom: 12px;
}

.detailed-description-content ul,
.detailed-description-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.detailed-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 12px 0;
}

.detailed-description-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.detailed-description-content table th,
.detailed-description-content table td {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.detailed-description-content table th {
    background: #f3f4f6;
    font-weight: 600;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.product-price {
    font-size: 20px;
    font-weight: 600;
    color: #2563eb;
}

.product-price-large {
    font-size: 32px;
    font-weight: 700;
    color: #2563eb;
    margin: 16px 0;
}

.product-stock {
    margin: 16px 0;
    color: #666;
}

.out-of-stock {
    color: #dc2626;
    font-weight: 600;
    padding: 12px;
    background: #fee2e2;
    border-radius: 4px;
    text-align: center;
}

/* Product Page */
.product-page {
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 0;
}

.product-images-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-image .main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.product-thumbnails {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    flex-shrink: 0;
}

.thumbnail-item:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.thumbnail-item.active {
    border-color: #2563eb;
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .product-main {
        grid-template-columns: 1fr;
    }
    
    .product-thumbnails {
        justify-content: center;
    }
    
    .thumbnail-item {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
}

.product-details h2,
.product-details h1,
.product-title-h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.add-to-cart-form {
    margin-top: 24px;
}

.add-to-cart-form .flex {
    align-items: center;
    gap: 12px;
}

.add-to-cart-form label {
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    text-align: center;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-secondary, .btn.secondary {
    background: #6b7280;
}

.btn-secondary:hover, .btn.secondary:hover {
    background: #4b5563;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-place-order {
    background: linear-gradient(135deg, #635bff 0%, #0a2540 100%);
    font-weight: 600;
    font-size: 16px;
    padding: 14px 24px;
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-place-order i {
    font-size: 16px;
}

.btn-place-order:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #1e40af 100%);
    box-shadow: 0 6px 16px rgba(99, 91, 255, 0.4);
    transform: translateY(-1px);
}

.btn-place-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Card */
.card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.card h3 {
    margin-bottom: 16px;
    font-size: 20px;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="url"],
textarea,
select {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

input[type="file"] {
    padding: 8px;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
}

input[type="file"]:hover {
    border-color: #2563eb;
    background: #f0f9ff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.auth-card {
    background: #fff;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-card h2 {
    margin-bottom: 24px;
    text-align: center;
    font-size: 24px;
}

.auth-form {
    margin-top: 24px;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    text-align: center;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.auth-divider span {
    padding: 0 16px;
    color: #6b7280;
    font-size: 14px;
}

.google-auth-container {
    margin-top: 16px;
}

.google-btn {
    width: 100%;
    background: #fff;
    color: #333;
    border: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.2s;
}

.google-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.google-btn svg {
    flex-shrink: 0;
}

/* Search */
.search-form {
    margin-bottom: 24px;
}

.search-inputs {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

/* Cart - Scoped to cart.php only */
.page-cart .cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: flex-start;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.page-cart .cart-items {
    min-width: 0;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

.page-cart .cart-checkout {
    min-width: 0;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.payment-option input[type="radio"] {
    width: auto;
    margin: 0;
}

/* Cart Order Summary - Scoped to cart.php */
.page-cart .cart-order-summary {
    padding: 16px 0 20px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
}

.page-cart .cart-order-summary p {
    margin: 8px 0;
    font-size: 15px;
    color: #374151;
}

.page-cart .cart-order-summary p strong {
    color: #1f2937;
    font-weight: 600;
}

.checkout-product-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 16px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.checkout-product-thumb {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}

.checkout-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    font-size: 24px;
}

.checkout-thumb-qty {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #3d3100;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    border: 2px solid white;
}

.free-delivery-badge {
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.free-delivery-badge i {
    font-size: 18px;
}

.cart-order-summary .shipping-note {
    margin-top: 12px;
    padding: 10px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: 13px;
    color: #92400e;
    font-weight: 500;
}

.payment-info {
    padding: 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    margin: 16px 0;
}

.payment-info p {
    margin: 0;
    color: #0369a1;
    font-size: 14px;
}

@media (max-width: 968px) {
    .page-cart .checkout-product-images {
        gap: 6px;
        padding: 10px;
    }
    
    .page-cart .checkout-product-thumb {
        width: 50px;
        height: 50px;
    }
    
    .page-cart .checkout-thumb-qty {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .page-cart .free-delivery-badge {
        font-size: 13px;
        padding: 10px;
    }
}

/* Cart Table - Scoped to cart.php */
.page-cart .cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    table-layout: auto;
    display: table;
    box-sizing: border-box;
}

.page-cart .cart-table.desktop-table {
    display: table;
}

.page-cart .cart-table th,
.page-cart .cart-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.page-cart .cart-table th {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.page-cart .cart-table tbody tr {
    transition: background-color 0.2s ease;
}

.page-cart .cart-table tbody tr:hover {
    background-color: #f9fafb;
}

.page-cart .cart-table tbody td {
    font-size: 15px;
}

.page-cart .cart-table tbody td:first-child {
    font-weight: 500;
}

.page-cart .cart-table tbody td a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.page-cart .cart-table tbody td a:hover {
    color: #3d3100;
}

.page-cart .cart-table tfoot th {
    background: #f9fafb;
    font-size: 16px;
    font-weight: 600;
    padding: 18px 16px;
}

.page-cart .cart-table tfoot tr:last-child th {
    background: linear-gradient(135deg, #3d3100 0%, #d37b00 100%);
    color: white;
    font-size: 20px;
    font-weight: 700;
    padding: 22px 16px;
}

.page-cart .cart-table tfoot tr:first-child th,
.page-cart .cart-table tfoot tr:nth-child(2) th {
    color: #6b7280;
    font-size: 15px;
}

/* Cart Quantity Input */
.page-cart .cart-table input[type="number"] {
    width: 80px !important;
    padding: 10px 12px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    text-align: center !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    background: #fff !important;
}

.page-cart .cart-table input[type="number"]:focus {
    outline: none !important;
    border-color: #3d3100 !important;
    box-shadow: 0 0 0 3px rgba(61, 49, 0, 0.1) !important;
}

/* Cart Remove Button */
.page-cart .cart-table .btn.secondary.btn-small {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 2px solid #fecaca;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
}

.page-cart .cart-table .btn.secondary.btn-small:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Mobile Cart View - Scoped to cart.php */
.page-cart .cart-mobile-view {
    display: none;
}

.page-cart .cart-item-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    display: flex;
    gap: 16px;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s ease;
}

.page-cart .cart-item-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.page-cart .cart-item-image {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
}

.page-cart .cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-cart .cart-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.page-cart .cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.page-cart .cart-item-details h4 {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
}

.page-cart .cart-item-details h4 a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    display: block;
}

.page-cart .cart-item-details h4 a:hover {
    color: #3d3100;
}

.page-cart .cart-item-price {
    color: #3d3100;
    font-size: 16px;
    font-weight: 600;
}

.cart-item-quantity-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-form-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.quantity-form-mobile label {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.quantity-input-mobile {
    width: 70px !important;
    padding: 8px !important;
    font-size: 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
}

.page-cart .cart-item-subtotal-mobile {
    color: #3d3100;
    font-size: 17px;
    margin-top: 6px;
    font-weight: 600;
}

.page-cart .btn-remove-mobile {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 2px solid #fecaca;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.page-cart .btn-remove-mobile:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.page-cart .cart-total-mobile {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    color: #1f2937;
    margin-top: 20px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-cart .cart-total-mobile strong {
    display: block;
    margin: 6px 0;
    font-size: 20px;
    color: #3d3100;
}

/* Responsive Cart - Scoped to cart.php */
@media (max-width: 768px) {
    .page-cart .cart-table.desktop-table {
        display: none;
    }
    
    .page-cart .cart-mobile-view {
        display: block;
    }
    
    .page-cart .cart-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .page-cart .cart-checkout {
        background: transparent;
        padding-top: 0;
        border-top: none;
        margin-top: 0;
        order: 2;
        position: static;
    }
    
    .page-cart .cart-checkout .card {
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.1);
        border: 1px solid #e5e7eb;
    }
    
    .page-cart .cart-items {
        order: 1;
    }
    
    .page-cart .cart-item-card {
        padding: 16px;
        gap: 16px;
    }
    
    .page-cart .cart-item-image {
        width: 100px;
        height: 100px;
    }
    
    .page-cart .cart-item-details h4 {
        font-size: 15px;
    }
    
    .page-cart .quantity-input-mobile {
        width: 70px !important;
        padding: 8px !important;
        border: 2px solid #d1d5db !important;
        border-radius: 8px !important;
    }
    
    .page-cart .quantity-input-mobile:focus {
        border-color: #3d3100 !important;
        box-shadow: 0 0 0 3px rgba(61, 49, 0, 0.1) !important;
    }
    
    .page-cart .checkout-form input,
    .page-cart .checkout-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 16px;
    }
    
    .page-cart .checkout-form button {
        padding: 16px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .page-cart .cart-item-card {
        flex-direction: column;
        padding: 16px;
        gap: 16px;
    }
    
    .page-cart .cart-item-image {
        width: 100%;
        height: 220px;
    }
    
    .page-cart .cart-item-details h4 {
        font-size: 16px;
    }
    
    .page-cart .quantity-input-mobile {
        width: 80px !important;
    }
    
    .page-cart .cart-total-mobile {
        padding: 18px;
        font-size: 16px;
    }
    
    .page-cart .cart-total-mobile strong {
        font-size: 18px;
    }
}

/* Checkout Form - Scoped to cart.php */
.page-cart .checkout-form {
    margin-top: 0;
}

.page-cart .checkout-form .field {
    margin-bottom: 18px;
}

.page-cart .checkout-form .field label {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-bottom: 6px;
}

.page-cart .checkout-form .field input,
.page-cart .checkout-form .field textarea {
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.page-cart .checkout-form .field input:focus,
.page-cart .checkout-form .field textarea:focus {
    outline: none;
    border-color: #3d3100;
    box-shadow: 0 0 0 3px rgba(61, 49, 0, 0.1);
}

.page-cart .payment-info {
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
    border-radius: 8px;
    margin: 20px 0;
}

.page-cart .payment-info p {
    margin: 0;
    color: #0369a1;
    font-size: 14px;
    font-weight: 500;
}

/* Place Order Button - Scoped to cart.php */
.page-cart .btn-place-order {
    background: linear-gradient(135deg, #3d3100 0%, #d37b00 100%);
    color: white;
    font-weight: 600;
    font-size: 16px;
    padding: 16px 24px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(61, 49, 0, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    text-transform: none;
    letter-spacing: 0;
}

.page-cart .btn-place-order i {
    font-size: 16px;
}

.page-cart .btn-place-order:hover {
    background: linear-gradient(135deg, #2d2500 0%, #b86900 100%);
    box-shadow: 0 6px 16px rgba(61, 49, 0, 0.4);
    transform: translateY(-2px);
}

.page-cart .btn-place-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Page Header - Scoped to cart.php */
.page-cart .page-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.page-cart .page-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
    color: #1f2937;
    font-weight: 700;
}

.page-cart .cart-count-text {
    color: #6b7280;
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

/* Track Order */
.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.muted {
    color: #6b7280;
    font-size: 14px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    padding: 20px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.order-header h3 {
    margin: 0;
    font-size: 18px;
}

.order-details {
    margin: 12px 0;
}

.order-details p {
    margin: 4px 0;
}

.order-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-shipped {
    background: #e0e7ff;
    color: #3730a3;
}

.status-delivered {
    background: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.order-detail-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.order-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.order-items-table th,
.order-items-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.order-items-table th {
    background: #f9fafb;
    font-weight: 600;
}

.shipping-details p {
    margin: 8px 0;
}

/* Admin Panel - Professional Design */
/* Admin Panel Background Override */
body:has(.admin-container) {
    background: #f8fafc;
}

.admin-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px 40px;
    background: transparent;
    min-height: calc(100vh - 100px);
}

.admin-header {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    margin: -24px -24px 32px -24px;
    padding: 32px 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-bottom: 3px solid #3d3100;
}

.admin-header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3d3100 0%, #d37b00 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(61, 49, 0, 0.3);
}

.admin-header h2 {
    font-size: 32px;
    color: white;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.admin-subtitle {
    color: #9ca3af;
    font-size: 14px;
    margin: 4px 0 0 0;
    font-weight: 400;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-logout:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 32px;
    background: white;
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    overflow-x: auto;
}

.admin-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    text-decoration: none;
    color: #6b7280;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
    position: relative;
}

.admin-tab i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.admin-tab:hover {
    color: #3d3100;
    background: #f9fafb;
}

.admin-tab.active {
    background: linear-gradient(135deg, #3d3100 0%, #d37b00 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(61, 49, 0, 0.3);
}

.admin-tab.active i {
    color: white;
}


.admin-section {
    margin-bottom: 32px;
}

.admin-section.card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.admin-section.card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.admin-section h3 {
    font-size: 26px;
    color: #111827;
    margin: 0 0 32px 0;
    font-weight: 700;
    padding-bottom: 20px;
    border-bottom: 3px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.3px;
}

.admin-section h3 i {
    color: #3d3100;
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 8px;
    padding: 6px;
}

.admin-form {
    margin-top: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.admin-form .field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-form .field label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-form .field label i {
    color: #3d3100;
    font-size: 14px;
    width: 18px;
}

.admin-form .field input,
.admin-form .field textarea,
.admin-form .field select {
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
    background: #fff;
    color: #111827;
}

.admin-form .field input:hover,
.admin-form .field textarea:hover,
.admin-form .field select:hover {
    border-color: #d1d5db;
}

.admin-form .field input:focus,
.admin-form .field textarea:focus,
.admin-form .field select:focus {
    outline: none;
    border-color: #3d3100;
    box-shadow: 0 0 0 4px rgba(61, 49, 0, 0.1);
    background: #fff;
}

.admin-form .field textarea {
    resize: vertical;
    min-height: 100px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 24px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.admin-table th,
.admin-table td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.admin-table th {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    font-weight: 700;
    color: #111827;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-table tbody tr {
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.admin-table tbody tr:hover {
    background-color: #f9fafb;
    border-left-color: #3d3100;
    transform: translateX(2px);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table details {
    margin: 0;
}

.admin-table details summary {
    cursor: pointer;
    color: #3d3100;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.2s;
}

.admin-table details summary:hover {
    background: #3d3100;
    color: white;
}

/* Table Cell Styling */
.table-id {
    font-weight: 700;
    color: #3d3100;
    font-size: 15px;
}

.price-cell {
    font-weight: 700;
    color: #059669;
    font-size: 16px;
}

.category-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #bae6fd;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.stock-badge.stock-in {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.stock-badge.stock-out {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.address-cell {
    max-width: 250px;
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.address-cell i {
    color: #3d3100;
    margin-top: 2px;
    flex-shrink: 0;
}

.address-text {
    flex: 1;
    word-break: break-word;
}

.email-link,
.phone-link {
    color: #3b82f6;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.email-link:hover,
.phone-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.email-link i,
.phone-link i {
    font-size: 12px;
}

.payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #dcfce7;
}

.date-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

.date-cell i {
    color: #9ca3af;
}

.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-status-badge.status-pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fde68a;
}

.order-status-badge.status-processing {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.order-status-badge.status-shipped {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.order-status-badge.status-delivered {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.order-status-badge.status-cancelled {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-radius: 16px;
    border: 2px dashed #e5e7eb;
    margin: 24px 0;
}

.empty-state i {
    font-size: 72px;
    color: #d1d5db;
    margin-bottom: 20px;
    display: block;
    opacity: 0.6;
}

.empty-state p {
    font-size: 18px;
    margin: 0;
    color: #9ca3af;
    font-weight: 500;
    line-height: 1.6;
}

/* Admin Table Header Icons */
.admin-table th i {
    margin-right: 6px;
    color: #3d3100;
    font-size: 13px;
}

.order-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-view {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-view:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.inline-form {
    display: inline;
    margin: 0;
}

.status-select {
    padding: 8px 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.status-select:focus {
    outline: none;
    border-color: #3d3100;
    box-shadow: 0 0 0 3px rgba(61, 49, 0, 0.1);
}

.btn-print {
    background: linear-gradient(135deg, #3d3100 0%, #d37b00 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 49, 0, 0.3);
}

.order-view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
}

.order-view-header h3 {
    font-size: 28px;
    color: #1f2937;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.order-view-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.order-view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.order-view-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.order-view-card h4 {
    font-size: 18px;
    color: #1f2937;
    margin: 0 0 16px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.order-view-card h4 i {
    color: #3d3100;
}

.order-view-details p {
    margin: 12px 0;
    color: #374151;
    line-height: 1.6;
}

.order-view-details strong {
    color: #1f2937;
    font-weight: 600;
}

.status-update-form {
    margin-top: 16px;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.order-items-table th,
.order-items-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.order-items-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #1f2937;
}

.order-items-table tfoot th {
    background: linear-gradient(135deg, #3d3100 0%, #d37b00 100%);
    color: white;
    font-size: 16px;
}

/* Product Form Improvements */
.image-upload-section {
    background: #f9fafb;
    border-radius: 12px;
    padding: 24px !important;
}

.image-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.image-upload-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.image-upload-item:hover {
    border-color: #3d3100;
    box-shadow: 0 4px 12px rgba(61, 49, 0, 0.15);
    transform: translateY(-2px);
}

.image-upload-item .file-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.image-upload-item .file-input:hover {
    border-color: #3d3100;
    background: #f9fafb;
}

.image-url-divider {
    text-align: center;
    margin: 12px 0;
    position: relative;
}

.image-url-divider::before,
.image-url-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e5e7eb;
}

.image-url-divider::before {
    left: 0;
}

.image-url-divider::after {
    right: 0;
}

.image-url-divider span {
    background: white;
    padding: 0 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
}

.image-upload-item .url-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.image-upload-item .url-input:focus {
    outline: none;
    border-color: #3d3100;
    box-shadow: 0 0 0 3px rgba(61, 49, 0, 0.1);
}

/* Enhanced Product Edit Form */
.product-edit-form-wrapper .form-grid {
    margin-bottom: 20px;
}

.product-edit-form-wrapper .admin-form .field {
    margin-bottom: 0;
}

.product-edit-form-wrapper .image-upload-section {
    margin-top: 20px;
}

/* Better visual hierarchy for edit forms */
.product-edit-form-wrapper {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved table row styling */
.admin-table tbody td {
    vertical-align: middle;
}

.admin-table tbody td strong {
    color: #1f2937;
    font-weight: 600;
}

/* Status badge improvements */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.status-shipped {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge.status-delivered {
    background: #d1fae5;
    color: #065f46;
}

.form-actions {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 2px solid #f3f4f6;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, #3d3100 0%, #d37b00 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(61, 49, 0, 0.25);
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(61, 49, 0, 0.4);
    background: linear-gradient(135deg, #2d2500 0%, #b86900 100%);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.admin-form .field label i {
    color: #3d3100;
    margin-right: 6px;
}


/* Product Edit Details */
.product-edit-details {
    margin: 0;
}

.product-edit-details summary {
    list-style: none;
}

.product-edit-details summary::-webkit-details-marker {
    display: none;
}

.edit-summary {
    cursor: pointer;
    color: #3d3100;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.edit-summary:hover {
    background: linear-gradient(135deg, #3d3100 0%, #d37b00 100%);
    color: white;
    border-color: #3d3100;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 49, 0, 0.3);
}

.edit-summary i {
    font-size: 14px;
}

.product-edit-form-wrapper {
    margin-top: 24px;
    padding: 32px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    letter-spacing: 0.3px;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.btn-danger:active {
    transform: translateY(-1px);
}

/* Notices */
.notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.notice.error {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Flex utilities */
.flex {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 16px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .admin-container {
        padding: 0 16px 32px;
    }
    
    .admin-header {
        margin: -16px -16px 24px -16px;
        padding: 24px 20px;
    }
    
    .admin-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .admin-logo {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .admin-header h2 {
        font-size: 24px;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
        padding: 4px;
    }
    
    .admin-tab {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .admin-section.card {
        padding: 24px;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .order-view-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .order-view-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .order-view-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .order-view-actions .btn {
        width: 100%;
    }
    
    .order-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .order-actions .btn-view,
    .order-actions .status-select {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }
}


/* ===============================
   MOBILE PRODUCT PAGE CLEANUP
   =============================== */
@media (max-width: 600px) {

    /* Main container */
    .product-page {
        padding: 10px !important;
    }

    .product-main {
        flex-direction: column !important;
        gap: 18px !important;
    }

    /* Image section */
    .product-images-section {
        padding: 0 !important;
        margin: 0 !important;
    }

    .product-main-image {
        border-radius: 12px;
        overflow: hidden;
    }

    .main-image {
        height: 320px !important;
        object-fit: cover;
    }

    /* Thumbnails */
    .product-thumbnails {
        gap: 8px !important;
        margin-top: 10px !important;
        padding: 0 !important;
    }

    .thumbnail-item {
        width: 55px !important;
        height: 55px !important;
        border-radius: 8px;
    }

    .thumbnail-item img {
        object-fit: cover;
    }

    /* Product details */
    .product-details {
        padding: 10px 5px !important;
    }

    .product-details h2,
    .product-details h1,
    .product-title-h1 {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }

    .product-category-badge {
        font-size: 0.85rem !important;
        margin-bottom: 8px !important;
        display: inline-block;
    }

    .product-price-large {
        font-size: 1.5rem !important;
        margin: 8px 0 12px !important;
    }

    /* Description */
    .product-description-full h4 {
        font-size: 1.1rem !important;
        margin-bottom: 6px !important;
    }

    .product-description-full p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 10px !important;
    }

    /* Stock text */
    .product-stock {
        font-size: 0.9rem !important;
        margin: 10px 0 !important;
    }

    /* Add to cart */
    .add-to-cart-form {
        margin-top: 10px !important;
    }

    .add-to-cart-form .flex {
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
    }

    .add-to-cart-form input[type="number"] {
        width: 80px !important;
        padding: 8px !important;
        font-size: 0.95rem !important;
    }

    .add-to-cart-form button {
        padding: 10px 18px !important;
        font-size: 0.95rem !important;
        border-radius: 8px !important;
    }

    /* Detailed description full width */
    .product-detailed-description-fullwidth {
        padding: 15px !important;
        margin-top: 20px !important;
        border-radius: 12px !important;
    }

    .detailed-description-content {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    /* Remove unnecessary large gaps */
    .product-page > * {
        margin-bottom: 12px !important;
    }

    /* Placeholder image */
    .product-image-placeholder.large {
        height: 280px !important;
        font-size: 3rem !important;
    }
}
/* Show All Button */
.show-all-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.show-all-btn {
    background: linear-gradient(135deg, #3d3100, #d37b00);
    color: #fff;
    padding: 14px 42px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(61, 49, 0, 0.25);
}

.show-all-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(61, 49, 0, 0.4);
    background: #d37b00;
}

/* Mobile tuning */
@media (max-width: 600px) {
    .show-all-btn {
        width: 90%;
        text-align: center;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .show-all-wrapper {
        margin-top: 18px;
    }
}

/* ======================================
   PRODUCT CARD HEIGHT NORMALIZATION
   ====================================== */

/* Make all cards same height */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Ensure image always same height */
.product-image-container {
    height: 320px;
    flex-shrink: 0;
}

/* Card body grows evenly */
.product-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Title clamp (2 lines) */
.product-info h4 {
    min-height: 2.6em;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Description clamp (3 lines) */
.product-description {
    min-height: 4.5em;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Push footer to bottom */
.product-footer {
    margin-top: auto;
}

/* Ensure consistent spacing */
.product-info {
    gap: 8px;
}

/* Price + button alignment */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ======================
   MOBILE ADJUSTMENTS
   ====================== */
@media (max-width: 600px) {

    .product-image-container {
        height: 260px;
    }

    .product-info h4 {
        font-size: 1.05rem;
        min-height: 2.4em;
    }

    .product-description {
        font-size: 0.9rem;
        min-height: 4em;
    }

    .product-footer {
        margin-top: auto;
    }
}

/* ======================================
   TIGHTER VERTICAL SPACING (CARD CONTENT)
   ====================================== */

/* Reduce internal gaps */
.product-info {
    gap: 4px !important;
}

/* Title */
.product-info h4 {
    margin-bottom: 4px !important;
}

/* Description */
.product-description {
    margin-bottom: 6px !important;
}

/* Price */
.product-price {
    margin: 4px 0 6px !important;
}

/* Footer (price + button container) */
.product-footer {
    margin-top: 6px !important;
    padding-top: 4px !important;
}

/* Button spacing */
.product-footer .btn,
.product-footer button {
    padding: 8px 14px !important;
    font-size: 0.9rem !important;
}

/* Mobile extra tightening */
@media (max-width: 600px) {

    .product-info {
        gap: 3px !important;
    }

    .product-info h4 {
        margin-bottom: 3px !important;
    }

    .product-description {
        margin-bottom: 4px !important;
    }

    .product-price {
        margin: 3px 0 5px !important;
    }

    .product-footer {
        margin-top: 4px !important;
    }
}


/* ================= CATEGORY GROUP STYLES ================= */

.western-section {
    background: linear-gradient(180deg, #fffaf3, #ffffff);
    padding: 60px 0;
}

.ethnic-section {
    background: linear-gradient(180deg, #fff4ec, #ffffff);
    padding: 60px 0;
}

.bottoms-section {
    background: linear-gradient(180deg, #f6f8ff, #ffffff);
    padding: 60px 0;
}

/* Group headings */
.category-group-header {
    text-align: center;
    margin-bottom: 50px;
}

.category-group-header h2 {
    font-size: 2.6rem;
    color: #3d3100;
    margin-bottom: 10px;
}

.category-group-header p {
    font-size: 1.1rem;
    color: #666;
}

/* Divider line */
.category-group-divider {
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #3d3100, #d37b00);
    margin: 18px auto 0;
    border-radius: 3px;
}

/* Smaller spacing between category blocks */
.category-section {
    margin-bottom: 45px;
}

/* Optional visual tone differences */
.western-section .product-card {
    border-radius: 18px;
}

.ethnic-section .product-card {
    border-radius: 12px;
    border: 1px solid #f2d6b3;
}

.bottoms-section .product-card {
    border-radius: 14px;
    background: #fafafa;
}

/* =========================================================
   MOBILE RESPONSIVE IMPROVEMENTS
========================================================= */

@media (max-width: 768px) {

    /* Section padding */
    .western-section,
    .ethnic-section,
    .bottoms-section {
        padding: 35px 12px;
    }

    /* Section headers */
    .category-group-header h2 {
        font-size: 1.6rem;
        line-height: 1.2;
    }

    .category-group-header p {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .category-group-divider {
        width: 80px;
        height: 3px;
    }

    /* Category title */
    .category-header h3 {
        font-size: 1.25rem;
        margin-bottom: 10px;
    }

    /* PRODUCT GRID → 2 columns on mobile */
    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Card styling */
    .product-card {
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
        overflow: hidden;
    }

    /* Image container */
    .product-image-container {
        height: 190px;
    }

    .product-image {
        object-fit: cover;
    }

    
    /* Info area */
    .product-info {
        padding: 10px;
    }

    .product-category-tag {
        font-size: 10px;
        padding: 3px 8px;
        margin-bottom: 4px;
        display: inline-block;
    }

    .product-info h4 {
        font-size: 13px;
        line-height: 1.3;
        margin-bottom: 6px;
        min-height: 34px;
    }

    .product-description {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    /* Footer */
    .product-footer {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

    .product-price {
        font-size: 14px;
        font-weight: 700;
    }

    .btn-view-details {
        width: 100%;
        text-align: center;
        padding: 8px 10px;
        font-size: 12px;
        border-radius: 8px;
    }

    /* Show all button */
    .show-all-wrapper {
        margin-top: 20px;
        text-align: center;
    }

    .show-all-btn {
        font-size: 13px;
        padding: 10px 18px;
        border-radius: 20px;
    }
}

/* =========================================================
   EXTRA SMALL DEVICES (VERY SMALL PHONES)
========================================================= */

@media (max-width: 420px) {

    .products-grid {
        gap: 10px;
    }

    .product-image-container {
        height: 170px;
    }

    .product-info h4 {
        font-size: 12.5px;
    }

    .product-description {
        display: none; /* cleaner UI */
    }

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