.product-actions-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
    margin: 0.75rem 0 1.25rem;
}

.product-actions-toolbar .btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    min-height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    font-weight: 600;
    transition: background-color .2s ease, border-color .2s ease, transform .05s ease;
    text-decoration: none;
}
.product-actions-toolbar .btn-action svg { width: 18px; height: 18px; }
.product-actions-toolbar .btn-action:hover { background: #f9fafb; border-color: #d1d5db; }
.product-actions-toolbar .btn-action:active { transform: translateY(1px); }
.product-actions-toolbar .btn-action[disabled],
.product-actions-toolbar .btn-action[aria-disabled="true"] {
    opacity: .6;
    cursor: not-allowed;
}

.product-actions-toolbar .btn-action.primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.product-actions-toolbar .btn-action.primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}
.product-actions-toolbar .btn-action:focus {
    outline: 3px solid rgba(37,99,235,.25);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .product-actions-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .product-actions-toolbar .btn-action {
        width: 100%;
        padding: 12px 14px;
        border-radius: 9px;
        font-size: 0.95rem;
    }
    .product-actions-toolbar .btn-action.primary {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .product-actions-toolbar {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .product-actions-toolbar .btn-action {
        padding: 11px 12px;
        font-size: 0.9rem;
        min-height: 42px;
    }
}
/* ========== PRODUCTS PAGE STYLES ========== */

/* Notifications */
.product-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #059669;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 350px;
}

.product-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.product-notification-success {
    background: #059669;
}

.product-notification-error {
    background: #dc2626;
}

.products-page {
    min-height: 100vh;
}

/* Products Hero Section */
.products-hero {
    background: var(--gradient-primary);
    padding: 4rem 0;
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-description {
    font-size: 1.25rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Products Filter Section */
.products-filter {
    background: var(--bg-primary);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.filter-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.filter-form {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.filter-select,
.filter-input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: white;
    transition: all var(--transition-normal);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.1);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filter-actions .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

/* Products Grid Section */
.products-grid-section {
    padding: 2rem 0;
    background: var(--bg-secondary);
}

/* Sidebar Layout */
.products-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
}

.products-sidebar {
    position: sticky;
    top: 64px;
    align-self: start;
}

.products-content {
    min-width: 0;
}

@media (max-width: 992px) {
    .products-layout { grid-template-columns: 1fr; }
    .products-sidebar { position: static; }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

/* Category sections */
.category-section { margin-bottom: 2rem; }
.category-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: .75rem; }
.category-title { font-family: var(--font-heading); font-size: 1.375rem; font-weight: 700; color: var(--text-primary); margin: 0; }

/* Category Page Header */
.category-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-light);
}

.category-page-header .page-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.category-page-header .category-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Make the section full-width */
.products-grid-section .container {
    max-width: 100%;
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
}

/* Product card size + typography tweaks for denser layout */
.product-card {
    border-radius: 8px;
}

.product-image { aspect-ratio: 4/3; }

.product-content { padding: 0.75rem; gap: 0.3rem; display:flex; flex-direction:column; height:100%; }

.product-title a { font-size: 0.9rem; -webkit-line-clamp: 2; min-height: 2.8em; }

.product-description { font-size: 0.8rem; -webkit-line-clamp: 2; }

.product-price { margin-top: auto; }
.price-current, .price-sale { font-size: 0.875rem; }
.price-original { font-size: 0.75rem; }

/* Sidebar filter polish */
.products-sidebar .filter-wrapper { background: #fff; border: 1px solid var(--border-light); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 0.75rem 1rem 1rem; }
.products-sidebar .filter-group { margin-bottom: 0.75rem; }
.products-sidebar .filter-group:last-child { margin-bottom: 0; }
.products-sidebar .filter-group label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.25rem; display: block; }
.products-sidebar .filter-select, .products-sidebar .filter-input { height: 40px; padding: 0 0.75rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.875rem; }
.products-sidebar .filter-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }

@media (min-width: 1440px) {
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

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

.product-img-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 3rem;
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    z-index: 10;
}

.product-badge.featured {
    left: 0.75rem;
    background: var(--primary-color);
    color: white;
}

.product-badge.sale {
    right: 0.75rem;
    background: var(--error-color);
    color: white;
}

/* Fix badge on product detail page - move to bottom right on mobile */
.product-detail-section .product-badge.featured {
    top: auto;
    bottom: 0.75rem;
    left: 0.75rem;
}

@media (max-width: 768px) {
    .product-detail-section .product-badge {
        font-size: 0.6875rem;
        padding: 0.2rem 0.6rem;
        top: auto;
        bottom: 0.5rem;
    }
    
    .product-detail-section .product-badge.featured {
        left: 0.5rem;
        bottom: 0.5rem;
    }
    
    .product-detail-section .product-badge.sale {
        right: 0.5rem;
        bottom: 0.5rem;
    }
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-content {
    padding: 0.875rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.product-title {
    margin-bottom: 0.1rem;
}

.product-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
    transition: color var(--transition-normal);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.35;
    margin-bottom: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-price {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price-current {
    font-size: 0.9375rem;
    font-weight: 900;
    color: #059669;
    white-space: nowrap;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.price-sale-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.price-sale {
    font-size: 0.9375rem;
    font-weight: 900;
    color: #dc2626;
    white-space: nowrap;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.price-original {
    font-size: 0.8125rem;
    color: #94a3b8;
    text-decoration: line-through;
    white-space: nowrap;
    font-weight: 500;
    line-height: 1.2;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.product-actions .btn-add-to-cart {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.product-actions .btn-add-to-cart:hover {
    background: #0070f3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 112, 243, 0.3);
}

.product-actions .btn-share {
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.product-actions .btn-share:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.product-actions .btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.product-sku {
    display: none;
}

.product-stock {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.product-stock.in-stock {
    background: var(--success-color);
    color: white;
}

.product-stock.out-of-stock {
    background: var(--error-color);
    color: white;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-link {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-link.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* No Products */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
}

.no-products-content i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.no-products-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.no-products-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ========== PRODUCT DETAIL PAGE ========== */

.product-detail-page {
    min-height: 100vh;
}

/* Breadcrumb */
.breadcrumb-section {
    background: var(--bg-secondary);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.breadcrumb-link:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-light);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Product Detail Section */
.product-detail-section {
    padding: 2rem 0;
    background: white;
}

.product-detail-wrapper {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
    align-items: start;
}

/* Product Images */
.product-images {
    position: sticky;
    top: 2rem;
    max-width: 100%;
}

.main-image {
    position: relative;
    aspect-ratio: 4/3;
    max-height: 450px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}

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

/* Gallery Carousel */
.gallery-carousel {
    margin-top: 0.75rem;
}

.gallery-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gallery-nav {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.gallery-nav svg {
    width: 14px;
    height: 14px;
}

.gallery-nav:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.gallery-thumbnails {
    flex: 1;
    overflow: hidden;
    width: 390px; /* Chính xác 5 thumbnails: 70px × 5 + gap 0.5rem × 4 = 350px + 40px = 390px */
}

.gallery-track {
    display: flex;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.thumbnail {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--primary-color);
}

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

/* Product Info */
.product-info {
    padding-left: 2rem;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 0;
    color: var(--text-primary);
    line-height: 1.2;
    display: block;
    visibility: visible;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.stars i {
    font-size: 1.25rem;
    color: var(--text-light);
}

.stars i.filled {
    color: #fbbf24;
}

.rating-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.product-price {
    margin-bottom: 2rem;
}

.product-price .price-current,
.product-price .price-sale {
    font-size: 2rem;
    font-weight: 700;
}

.product-price .price-original {
    font-size: 1.25rem;
    margin-left: 1rem;
}

.product-description,
.product-specs {
    margin-bottom: 2rem;
}

.product-description h3,
.product-specs h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.description-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.specs-content {
    display: grid;
    gap: 0.75rem;
}

.spec-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.spec-label {
    font-weight: 600;
    color: var(--text-primary);
}

.spec-value {
    color: var(--text-secondary);
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-actions-secondary {
    display: flex;
    gap: 1rem;
    flex: 0 0 auto;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
}

.add-to-cart {
    flex: 1;
}

.add-to-wishlist {
    flex: 0 0 auto;
}

.btn-share-product {
    flex: 0 0 auto;
}

.add-to-wishlist.active {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

/* Product Meta */
.product-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item i {
    color: var(--primary-color);
}

/* Product Content Section */
.product-content-section {
    padding: 2rem 0;
    background: var(--bg-secondary);
}

.product-content-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 9px;
    padding: 2rem 2.25rem;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

.content-wrapper h2 {
    font-size: 1.55rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    text-align: center;
}

.content-body {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    line-height: 1.8;
    color: #222;
    overflow-wrap: break-word;
}

.content-body.content-collapsed {
    max-height: clamp(320px, 55vh, 460px);
    overflow: hidden;
    position: relative;
}

.content-body.content-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
}

.content-body.content-expanded {
    max-height: none;
    overflow: visible;
}

.content-body.content-expanded::after {
    display: none;
}

.content-toggle-btn {
    display: none;
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.content-toggle-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.content-toggle-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.content-wrapper.has-toggle .content-toggle-btn {
    display: block;
}

/* Related Products Section */
.related-products-section {
    padding: 3rem 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Related products pagination */
.related-pagination {
    margin-top: 0.5rem;
}
.rel-page-btn {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-primary);
    cursor: pointer;
}
.rel-page-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.rel-page-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-info {
        padding-left: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-actions {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-meta {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .gallery-thumbnails {
        justify-content: center;
    }
    
    /* Product Detail Mobile Optimizations */
    .product-detail-section {
        padding: 1.5rem 0;
    }
    
    .product-detail-wrapper {
        gap: 1.5rem;
    }
    
    .product-info {
        padding-left: 0;
        margin-top: 0;
        padding-top: 0;
    }
    
    .product-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
        margin-top: 0 !important;
        padding-top: 0 !important;
        color: #111 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative;
        z-index: 1;
    }
    
    .product-rating {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .product-price {
        margin-bottom: 1rem;
    }
    
    .product-price .price-current,
    .product-price .price-sale {
        font-size: 1.5rem;
    }
    
    .product-price .price-original {
        font-size: 1rem;
        margin-left: 0.5rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .product-actions .add-to-cart,
    .product-actions .btn-secondary {
        width: 100%;
    }
    
    .product-actions-secondary {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        width: 100%;
    }
    
    .product-actions-secondary .btn {
        width: 100%;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .product-content-section {
        padding: 1.5rem 0;
    }
    
    .product-content-section .container {
        padding: 0 0.75rem;
    }
    
    .content-wrapper {
        padding: 1.5rem 1.25rem;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* Content Collapse on Mobile */
    .content-body.content-collapsed {
        max-height: clamp(260px, 52vh, 380px);
    }
    
    .content-toggle-btn {
        padding: 0.675rem 1.3rem;
        font-size: 0.9rem;
    }
    
    .product-reviews-section {
        padding: 1.5rem 0 2rem;
    }
    
    /* Related Products Mobile */
    .related-products-section {
        padding: 2rem 0;
    }
    
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .section-header p {
        font-size: 0.9375rem;
    }
    
    .content-wrapper h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .content-body {
        padding: 1.25rem;
        font-size: 0.9375rem;
    }
    
    /* Gallery Mobile - Grid Layout */
    .gallery-thumbnails {
        width: 100%;
        max-width: 100%;
    }
    
    .gallery-track {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        transform: none !important;
    }
    
    .gallery-nav {
        display: none;
    }
    
    .thumbnail {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
}

/* Mobile 640px and below - 2 columns with compact spacing */
@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.375rem;
    }
    
    .product-card {
        border-radius: 6px;
    }
    
    .product-content {
        padding: 0.5rem;
        gap: 0.25rem;
    }
    
    .product-title a {
        font-size: 0.875rem;
        line-height: 1.3;
        min-height: 2.4em;
    }
    
    .product-price {
        margin-bottom: 0.25rem;
    }
    
    .price-current,
    .price-sale {
        font-size: 0.8125rem;
    }
    
    .product-actions {
        gap: 0.375rem;
        margin-top: 0.5rem;
    }
    
    .product-actions .btn-add-to-cart {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .product-actions .btn-share {
        width: 36px;
        height: 36px;
    }
    
    .product-actions .btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* Product Detail - Grid Layout for Info */
    .product-info .product-rating {
        display: grid !important;
        grid-template-columns: auto 1fr;
        gap: 0.5rem;
        align-items: center;
    }
    
    .product-info .product-price {
        display: grid !important;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 0.5rem;
    }
    
    .product-info .product-price .price-original {
        margin-left: 0;
        grid-column: 2;
        grid-row: 1;
    }
    
    .product-description {
        margin: 1rem 0;
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .gallery-track {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.375rem;
    }
    
    .thumbnail {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .products-hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .products-filter {
        padding: 1rem 0;
    }
    
    .filter-form {
        padding: 1rem;
    }
    
    /* Keep 2 columns on mobile for better space usage */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.375rem;
    }
    
    .product-content {
        padding: 0.5rem;
    }
    
    .product-title a {
        font-size: 0.8125rem;
        min-height: 2.2em;
    }
    
    .product-price .price-current,
    .product-price .price-sale {
        font-size: 0.75rem;
    }
    
    .price-original {
        font-size: 0.6875rem;
    }
    
    .product-actions .btn-add-to-cart {
        padding: 0.35rem 0.45rem;
        font-size: 0.6875rem;
    }
    
    .product-actions .btn-share {
        width: 32px;
        height: 32px;
    }
    
    /* Product Detail Mobile */
    .product-detail-section {
        padding: 1rem 0;
    }
    
    .product-detail-wrapper {
        gap: 1rem;
    }
    
    .product-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
        margin-top: 0;
        color: #111 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
    }
    
    .product-info {
        order: 2;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .product-images {
        order: 1;
        margin-bottom: 0.75rem;
    }
    
    .product-title {
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .product-rating {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }
    
    .product-price .price-current,
    .product-price .price-sale {
        font-size: 1.25rem;
    }
    
    .product-price .price-original {
        font-size: 0.875rem;
    }
    
    .product-description {
        margin: 0.75rem 0;
        padding: 0.625rem;
        font-size: 0.8125rem;
    }
    
    .product-actions {
        gap: 0.5rem;
    }
    
    .product-actions .add-to-cart,
    .product-actions .btn-secondary {
        width: 100%;
    }
    
    .product-actions-secondary {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }
    
    .product-actions-secondary .btn {
        width: 100%;
    }
    
    .btn-large {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .main-image {
        max-height: 300px;
        margin-bottom: 0.75rem;
    }
    
    .gallery-track {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.25rem;
    }
    
    .product-content-section .container {
        padding: 0 0.5rem;
    }
    
    .content-wrapper {
        padding: 1rem;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .content-wrapper h2 {
        font-size: 1.125rem;
    }
    
    /* Content Collapse on Small Mobile */
    .content-body.content-collapsed {
        max-height: clamp(220px, 60vh, 320px);
    }
    
    .content-toggle-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .content-body {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    .product-reviews-section {
        padding: 1rem 0 1.5rem;
    }
    
    .review-item-card {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .review-avatar {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.8125rem !important;
    }
    
    #review-form {
        margin-top: 1rem !important;
        padding-top: 1rem !important;
    }
    
    /* Related Products Mobile - Small Screens */
    .related-products-section {
        padding: 1.5rem 0;
    }
    
    .section-header {
        margin-bottom: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
        margin-bottom: 0.375rem;
    }
    
    .section-header p {
        font-size: 0.875rem;
    }
}

/* ========== PRODUCT REVIEWS ========== */
.product-reviews-section {
    padding: 2rem 0 3rem;
    background: var(--bg-secondary);
}

.reviews-wrapper {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.reviews-wrapper h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Review Item Card */
.review-item-card {
    transition: all 0.2s ease;
}

.review-item-card:hover {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.review-avatar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.reviews-list {
    margin-top: 1rem;
}

.review-item {
    border-top: 1px solid var(--border-light);
    padding: .75rem 0;
}

.review-item .review-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
}

.review-item .review-stars {
    color: #f59e0b;
}

.review-item .review-content {
    margin-top: .35rem;
    color: var(--text-secondary);
    white-space: pre-line;
}

#review-form {
    margin-top: 1rem;
}

#review-form .form-control {
    padding: .625rem .75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: .9375rem;
}

#review-form .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#review-form input[type="text"]:focus,
#review-form textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#review-form .btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#review-form textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

#review-form .btn.btn-primary {
    padding: .75rem 1.25rem;
    font-weight: 600;
}

/* rating stars input */
.rating-stars {
    display: inline-flex;
    gap: 4px;
    user-select: none;
}

.rating-stars .star {
    font-size: 22px;
    color: #e5e7eb; /* slate-200 */
    cursor: pointer;
    transition: transform .1s ease, color .15s ease;
}

.rating-stars .star:hover {
    transform: scale(1.05);
}

.rating-stars .star.active,
.rating-stars .star.filled {
    color: #f59e0b; /* amber-500 */
}

#review-form .rating-stars .star {
    font-size: 28px;
    color: #e5e7eb !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

#review-form .rating-stars .star:hover,
#review-form .rating-stars .star.hovered {
    transform: scale(1.15);
    color: #fbbf24 !important;
}

#review-form .rating-stars .star.active,
#review-form .rating-stars .star.filled {
    color: #f59e0b !important;
}

#review-form .rating-stars .star.active.hovered {
    color: #fbbf24 !important;
}

/* grid helpers */
.col-span-2 { grid-column: 1 / -1; }

@media (max-width: 640px) {
    #review-form .grid-2 {
        grid-template-columns: 1fr !important;
    }
}
