* {
    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;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    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 {
    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;
}

/* 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 */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: flex-start;
}

.cart-items {
    min-width: 0;
}

.cart-checkout {
    min-width: 0;
}

@media (max-width: 968px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

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

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

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

.cart-table tfoot th {
    background: #f3f4f6;
    font-size: 18px;
}

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

.cart-item-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    gap: 16px;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
}

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

.cart-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #f0f0f0;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.cart-item-details h4 a {
    color: #1a1a1a;
    text-decoration: none;
}

.cart-item-details h4 a:hover {
    color: #2563eb;
}

.cart-item-price {
    color: #666;
    font-size: 14px;
}

.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;
}

.cart-item-subtotal-mobile {
    color: #2563eb;
    font-size: 16px;
    margin-top: 4px;
}

.btn-remove-mobile {
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
    width: 100%;
    transition: background 0.2s;
}

.btn-remove-mobile:hover {
    background: #b91c1c;
}

.cart-total-mobile {
    background: #f3f4f6;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 20px;
    color: #1a1a1a;
    margin-top: 16px;
}

/* Responsive Cart */
@media (max-width: 768px) {
    .cart-table.desktop-table {
        display: none;
    }
    
    .cart-mobile-view {
        display: block;
    }
    
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .cart-checkout {
        background: #fff;
        padding-top: 16px;
        border-top: 2px solid #e5e7eb;
        margin-top: 16px;
        order: 2;
    }
    
    .cart-items {
        order: 1;
    }
    
    .checkout-form input,
    .checkout-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
    
    .checkout-form button {
        padding: 14px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .cart-item-card {
        flex-direction: column;
        padding: 12px;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
    
    .cart-item-details h4 {
        font-size: 15px;
    }
    
    .quantity-input-mobile {
        width: 80px !important;
    }
}

.checkout-form {
    margin-top: 0;
}

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

/* 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 */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.admin-header h2 {
    font-size: 28px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
}

.admin-tabs a {
    padding: 12px 20px;
    text-decoration: none;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s;
}

.admin-tabs a:hover {
    color: #2563eb;
}

.admin-tabs a.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

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

.stat-card h3 {
    font-size: 36px;
    color: #2563eb;
    margin-bottom: 8px;
}

.stat-card p {
    color: #6b7280;
    font-size: 14px;
}

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

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

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

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

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

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

.admin-table details summary {
    cursor: pointer;
    color: #2563eb;
    font-size: 14px;
}

.admin-table details summary:hover {
    text-decoration: underline;
}

/* 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-tabs {
        flex-wrap: wrap;
    }

    .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 {
        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;
    }
}
