/* ===================================================
   TRẦN ANH PLUS - SHOP & PRODUCTS LIST STYLING
   Architecture: MOBILE-FIRST RESPONSIVE
   Palette: Nền giấy #f5f3ef, Thẻ trắng #ffffff, Viền #ebe8e1, Xanh lá nút #006837
   =================================================== */

:root {
    --shop-primary: #006837;
    --shop-primary-hover: #00532c;
    --shop-accent: #006837;
    --shop-accent-hover: #00532c;
    --shop-bg: #f5f3ef;
    --shop-card-bg: #ffffff;
    --shop-border: #ebe8e1;
    --shop-border-hover: #dedbd4;
    --shop-text-dark: #172b3f;
    --shop-text-muted: #607080;
    --shop-radius: 8px;
}

/* ===================================================
   1. BASE STYLES & MOBILE LAYOUT (DEFAULT < 640px)
   =================================================== */
.shop-page {
    background-color: var(--shop-bg);
    min-height: calc(100vh - 250px);
    padding: 20px 0 50px;
    font-family: inherit;
    color: var(--shop-text-dark);
    -webkit-font-smoothing: antialiased;
}

.shop-shell {
    width: calc(100% - 24px);
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero / Header đầu trang (Mobile) */
.shop-hero {
    background: transparent;
    border-bottom: none;
    padding: 0 0 16px;
    margin-bottom: 8px;
    position: relative;
}

.shop-hero-inner {
    position: relative;
    z-index: 1;
}

.shop-hero-eyebrow {
    display: inline-block;
    color: var(--shop-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.shop-hero-title {
    font-size: 24px;
    font-weight: 800;
    color: #2d3150;
    margin: 0 0 8px;
    line-height: 1.25;
    letter-spacing: -0.4px;
}

.shop-hero-title em {
    font-style: normal;
    color: #2d3150;
    background: linear-gradient(transparent 58%, #bdeeb8 0);
    padding: 0 4px;
    display: inline-block;
}

.shop-hero-desc {
    font-size: 13.5px;
    color: var(--shop-text-muted);
    max-width: 640px;
    margin: 0;
    line-height: 1.55;
}

/* Breadcrumb (Mobile: vuốt ngang mượt mà, không rớt dòng) */
.shop-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--shop-text-muted);
    margin-bottom: 16px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.shop-breadcrumb::-webkit-scrollbar {
    display: none;
}

.shop-breadcrumb a {
    color: var(--shop-text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

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

.shop-breadcrumb .sep {
    color: #cbd5e1;
    font-size: 11px;
    flex-shrink: 0;
}

.shop-breadcrumb .current {
    color: var(--shop-primary);
    font-weight: 700;
    flex-shrink: 0;
}

/* Shop Layout (Mobile: xếp chồng 1 cột) */
.shop-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Sidebar Categories (Mobile) */
.shop-sidebar {
    background: #ffffff;
    border: 1px solid var(--shop-border);
    border-top: 3px solid #006837;
    border-radius: var(--shop-radius);
    padding: 16px 14px;
    box-shadow: 0 2px 10px rgba(16, 43, 70, 0.04);
}

.shop-widget-title {
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--shop-text-dark);
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.shop-cat-toggle-icon {
    font-size: 12px;
    color: var(--shop-text-muted);
    transition: transform 0.2s ease;
}

.shop-sidebar.is-collapsed .shop-cat-toggle-icon {
    transform: rotate(-90deg);
}

.shop-sidebar.is-collapsed .shop-category-list {
    display: none;
}

.shop-sidebar.is-collapsed .shop-widget-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.shop-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-category-item {
    position: relative;
}

.shop-category-parent-row {
    display: flex;
    align-items: center;
    gap: 4px
}

.shop-category-parent-row .shop-category-link {
    min-width: 0;
    flex: 1
}

.shop-category-expand {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: #64748b;
    background: transparent;
    cursor: pointer
}

.shop-category-expand:hover {
    color: var(--shop-primary);
    background: #eef8f2
}

.shop-category-expand i {
    font-size: 11px;
    transition: transform .2s ease
}

.shop-category-item.is-expanded .shop-category-expand i {
    transform: rotate(180deg)
}

.shop-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 6px;
    color: #334155;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.1s ease;
    border: 1px solid transparent;
    min-height: 38px;
}

.shop-category-link .cat-label-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-category-link .cat-checkbox {
    width: 16px;
    height: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    background: #fff;
    flex-shrink: 0;
}

.shop-category-link .cat-checkbox svg {
    display: none;
    width: 10px;
    height: 10px;
    stroke: #fff;
    stroke-width: 3;
}

.shop-category-link .cat-count {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 600;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 10px;
    transition: all 0.1s ease;
}

/* Hover & Active Category Item */
.shop-category-link:hover {
    background: #eef8f2;
    color: #006837;
    border-color: #cdecd6;
}

.shop-category-link:hover .cat-checkbox {
    border-color: #006837;
}

.shop-category-link.is-active {
    background: #006837;
    color: #ffffff;
    font-weight: 700;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 104, 55, 0.22);
}

.shop-category-link.is-active .cat-checkbox {
    background: #ffffff;
    border-color: #ffffff;
}

.shop-category-link.is-active .cat-checkbox svg {
    display: block;
    stroke: #006837;
}

.shop-category-link.is-active .cat-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Subcategories Hierarchy */
.shop-subcategory-list {
    list-style: none;
    padding: 0 0 0 10px;
    margin: 3px 0 4px 8px;
    border-left: 2px solid #e2e8f0;
    display: none;
    flex-direction: column;
    gap: 3px;
}

.shop-category-item.is-expanded > .shop-subcategory-list {
    display: flex
}

.shop-category-item.has-active-child > .shop-subcategory-list {
    border-left-color: var(--shop-primary);
}

.shop-subcategory-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 5px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.1s ease;
    border: 1px solid transparent;
}

.shop-subcategory-link .subcat-label-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
}

.shop-subcategory-link .subcat-indicator {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.1s ease;
    flex-shrink: 0;
}

.shop-subcategory-link .subcat-count {
    font-size: 11px;
    color: #94a3b8;
}

.shop-subcategory-link:hover {
    background: #eef8f2;
    color: #006837;
}

.shop-subcategory-link.is-active {
    background: #eef8f2;
    color: #006837;
    font-weight: 700;
    border-color: #cdecd6;
}

.shop-subcategory-link.is-active .subcat-indicator {
    background: #006837;
}

/* Main Area Header (Mobile) */
.shop-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--shop-border);
}

.shop-results-count {
    font-size: 12.5px;
    color: var(--shop-text-muted);
}

.shop-results-count strong {
    color: var(--shop-primary);
    font-weight: 800;
}

.shop-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-sort-select {
    padding: 6px 8px;
    border: 1px solid var(--shop-border);
    border-radius: 6px;
    background-color: #ffffff;
    font-size: 12.5px;
    color: #334155;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    max-width: 155px;
}

/* Products Grid: một sản phẩm mỗi hàng trên điện thoại */
.shop-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

/* Product Card (Mobile) */
.shop-card {
    background: #ffffff;
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 6px rgba(16, 43, 70, 0.04);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.shop-card:active {
    transform: scale(0.985);
}

/* Card Image */
.shop-card-media {
    position: relative;
    width: 100%;
    padding-top: 85%;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    overflow: hidden;
    display: block;
}

.shop-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.3s ease;
}

/* Badges */
.shop-card-badges {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.shop-badge {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.shop-badge-discount {
    background: var(--shop-primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 104, 55, 0.2);
}

.shop-badge-featured {
    background: #1e293b;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.shop-badge-quote {
    background: #475569;
    color: #fff;
}

/* Card Body */
.shop-card-body {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.shop-card-type {
    font-size: 10px;
    font-weight: 800;
    color: var(--shop-primary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
}

.shop-card-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--shop-text-dark);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 35px;
}

.shop-card-title a {
    color: inherit;
    text-decoration: none;
}

.shop-card-price-box {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: auto;
    margin-bottom: 10px;
}

.shop-price-main {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--shop-primary);
}

.shop-price-old {
    font-size: 11.5px;
    color: #94a3b8;
    text-decoration: line-through;
}

.shop-price-quote {
    font-size: 12.5px;
    font-weight: 700;
    color: #d97706;
}

/* Card Button (Mobile: chuẩn xanh lá bo góc 6px, nút bấm tay dễ chạm) */
.shop-card-btn {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    background: #006837;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 104, 55, 0.2);
    min-height: 36px;
}

.shop-card-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
    flex-shrink: 0;
}

.shop-card-btn:active {
    transform: scale(0.97);
}

/* Nút tư vấn báo giá */
.shop-card-btn.btn-quote {
    background: #eef8f2;
    color: #006837;
    border: 1px solid #006837;
    box-shadow: none;
}

/* Empty State */
.shop-empty {
    text-align: center;
    padding: 40px 16px;
    background: #fff;
    border: 1px dashed var(--shop-border);
    border-radius: var(--shop-radius);
    grid-column: 1 / -1;
}

.shop-empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.shop-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.shop-empty-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
}

.shop-empty-btn {
    display: inline-block;
    padding: 9px 18px;
    background: #006837;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.2s ease;
}

/* Ajax Loading State */
.shop-main {
    position: relative;
    transition: opacity 0.2s ease;
}

.shop-main.is-loading {
    pointer-events: none;
}

.shop-main.is-loading .shop-products-grid {
    opacity: 0.35;
    filter: blur(1px);
    transition: all 0.2s ease;
}

.shop-loader {
    display: none;
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--shop-border);
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--shop-primary);
}

.shop-main.is-loading .shop-loader {
    display: flex;
}

.shop-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: var(--shop-primary);
    border-radius: 50%;
    animation: shopSpin 0.7s linear infinite;
}

@keyframes shopSpin {
    to { transform: rotate(360deg); }
}

/* Pagination Styling (Mobile-First Responsive) */
#shopPaginationWrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
}

#shopPaginationWrapper nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

#shopPaginationWrapper nav svg {
    width: 16px !important;
    height: 16px !important;
    display: inline-block;
    vertical-align: middle;
}

#shopPaginationWrapper nav a,
#shopPaginationWrapper nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--shop-border);
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

#shopPaginationWrapper nav a:hover {
    background: #eef8f2;
    color: #006837;
    border-color: #006837;
}

#shopPaginationWrapper nav span[aria-current="page"] {
    background: #006837;
    color: #ffffff;
    border-color: #006837;
    font-weight: 700;
}

#shopPaginationWrapper nav span[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f8fafc;
}

/* ===================================================
   PRODUCT DETAIL PAGE (MOBILE DEFAULT)
   =================================================== */
.product-detail-page {
    padding-top: 12px;
}

.p-detail-container {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid var(--shop-border);
    box-shadow: 0 3px 12px rgba(16, 43, 70, 0.04);
    padding: 16px;
    margin-bottom: 24px;
}

.p-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Gallery Section (Mobile) */
.p-gallery {
    position: static;
    width: 100%;
}

.p-gallery-main {
    position: relative;
    width: 100%;
    padding-top: 80%;
    background: #f8fafc;
    border: 1px solid var(--shop-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-gallery-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}

.p-gallery-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

/* Product Info Section (Mobile) */
.p-info {
    display: flex;
    flex-direction: column;
}

.p-meta-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.p-category-badge {
    background: #eef8f2;
    color: #006837;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 5px;
    letter-spacing: 0.4px;
    text-decoration: none;
}

.p-sku-code {
    font-size: 11.5px;
    color: var(--shop-text-muted);
    background: #f1f5f9;
    padding: 3px 7px;
    border-radius: 5px;
}

.p-detail-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: #1e293b;
    margin: 0 0 12px;
}

/* Price Box (Mobile) */
.p-price-card {
    background: #f8fafc;
    border: 1px solid var(--shop-border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.p-detail-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--shop-primary);
}

.p-detail-old-price {
    font-size: 14px;
    color: #94a3b8;
    text-decoration: line-through;
}

.p-discount-tag {
    background: var(--shop-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

.p-summary-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 18px;
}

/* Quantity & Action Buttons (Mobile) */
.p-purchase-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.p-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.p-qty-label {
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
}

.p-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--shop-border);
    border-radius: 6px;
    background: #ffffff;
    overflow: hidden;
    height: 38px;
}

.p-qty-btn {
    width: 36px;
    height: 100%;
    background: #f8fafc;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.p-qty-btn:active {
    background: #eef8f2;
    color: #006837;
}

.p-qty-input {
    width: 44px;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    outline: none;
    -moz-appearance: textfield;
}

.p-qty-input::-webkit-outer-spin-button,
.p-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Action Buttons (Mobile: full width xếp dọc dễ chạm) */
.p-buttons-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.p-btn-add-cart {
    width: 100%;
    height: 46px;
    padding: 0 18px;
    border-radius: 6px;
    background: #006837;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(0, 104, 55, 0.2);
    text-decoration: none;
}

.p-btn-add-cart:active {
    transform: scale(0.98);
}

.p-btn-zalo {
    width: 100%;
    height: 46px;
    padding: 0 18px;
    border-radius: 6px;
    background: #eef8f2;
    color: #006837;
    border: 1.5px solid #006837;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.p-hotline-strip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.p-hotline-strip a {
    color: var(--shop-primary);
    font-weight: 700;
    text-decoration: none;
}

/* Product Content Box (Mobile) */
.p-content-box {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid var(--shop-border);
    box-shadow: 0 3px 12px rgba(16, 43, 70, 0.04);
    padding: 18px 16px;
    margin-bottom: 24px;
}

.p-content-heading {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
}

.p-content-heading::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--shop-primary);
}

.p-content-body {
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
    word-break: break-word;
    overflow-wrap: break-word;
}

.p-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 12px auto;
}

.p-content-body table {
    width: 100% !important;
    max-width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 13px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.p-content-body th,
.p-content-body td {
    padding: 8px 12px;
    border: 1px solid var(--shop-border);
    white-space: nowrap;
}

.p-content-body iframe,
.p-content-body video {
    max-width: 100%;
    height: auto;
}

/* Related Products Section (Mobile) */
.p-related-section {
    margin-bottom: 36px;
}

.p-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.p-related-title {
    font-size: 17px;
    font-weight: 800;
    color: #1e293b;
    position: relative;
    margin: 0;
}

.p-related-title::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 40px;
    height: 2.5px;
    background: var(--shop-primary);
    border-radius: 2px;
}

.p-related-view-all {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--shop-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===================================================
   2. TABLET ENHANCEMENT (@media min-width: 640px)
   =================================================== */
@media (min-width: 640px) {
    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .shop-page {
        padding: 26px 0 60px;
    }

    .shop-shell {
        width: calc(100% - 32px);
    }

    .shop-hero-title {
        font-size: 30px;
    }

    .shop-hero-desc {
        font-size: 14.5px;
    }

    .shop-card-body {
        padding: 14px 14px 16px;
    }

    .shop-card-title {
        font-size: 14px;
        min-height: 38px;
    }

    .shop-price-main {
        font-size: 16px;
    }

    .shop-card-btn {
        padding: 9px 14px;
        font-size: 13px;
    }

    .p-detail-container {
        padding: 24px;
        border-radius: 12px;
    }

    .p-detail-title {
        font-size: 23px;
    }

    .p-detail-price {
        font-size: 24px;
    }

    .p-buttons-row {
        flex-direction: row;
    }

    .p-btn-add-cart {
        flex: 1;
        width: auto;
    }

    .p-btn-zalo {
        flex: 0 0 auto;
        width: auto;
    }

    .p-hotline-strip {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
}

/* ===================================================
   3. DESKTOP ENHANCEMENT (@media min-width: 992px)
   =================================================== */
@media (min-width: 992px) {
    .shop-page {
        padding: 32px 0 70px;
    }

    .shop-hero {
        padding: 0 0 24px;
        margin-bottom: 12px;
    }

    .shop-hero-eyebrow {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .shop-hero-title {
        font-size: 38px;
    }

    .shop-hero-desc {
        font-size: 15px;
    }

    .shop-breadcrumb {
        font-size: 13.5px;
        margin-bottom: 24px;
    }

    /* 2 Column Layout trên Desktop */
    .shop-layout {
        display: grid;
        grid-template-columns: 270px 1fr;
        gap: 32px;
        align-items: start;
    }

    .shop-sidebar {
        position: sticky;
        top: 90px;
        padding: 24px 20px;
        border-radius: 10px;
    }

    .shop-widget-title {
        font-size: 14.5px;
        margin-bottom: 16px;
        cursor: default;
    }

    .shop-cat-toggle-icon {
        display: none !important;
    }

    .shop-sidebar.is-collapsed .shop-category-list {
        display: flex !important;
    }

    .shop-sidebar.is-collapsed .shop-widget-title {
        margin-bottom: 16px;
        padding-bottom: 10px;
        border-bottom: 1.5px solid #f1f5f9;
    }

    .shop-category-link {
        padding: 9px 12px;
        font-size: 14px;
    }

    /* 3 cột sản phẩm trên Desktop */
    .shop-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .shop-card:hover {
        transform: translateY(-4px);
        border-color: var(--shop-border-hover);
        box-shadow: 0 10px 24px rgba(16, 43, 70, 0.08);
    }

    .shop-card:active {
        transform: none;
    }

    .shop-card-img {
        padding: 14px;
    }

    .shop-card:hover .shop-card-img {
        transform: scale(1.06);
    }

    .shop-card-body {
        padding: 16px 16px 18px;
    }

    .shop-card-title {
        font-size: 15px;
        min-height: 40px;
    }

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

    .shop-card-btn:hover {
        background: #00532c;
        box-shadow: 0 5px 16px rgba(0, 104, 55, 0.35);
        transform: translateY(-2px);
    }

    /* Detail Page Desktop (2 Columns) */
    .p-detail-container {
        padding: 32px;
        margin-bottom: 36px;
    }

    .p-detail-layout {
        display: grid;
        grid-template-columns: 460px 1fr;
        gap: 36px;
        align-items: start;
    }

    .p-gallery {
        position: sticky;
        top: 20px;
    }

    .p-gallery-main {
        border-radius: 10px;
    }

    .p-gallery-main:hover .p-gallery-img {
        transform: scale(1.05);
    }

    .p-detail-title {
        font-size: 26px;
    }

    .p-price-card {
        padding: 16px 20px;
    }

    .p-detail-price {
        font-size: 26px;
    }

    .p-btn-add-cart:hover {
        background: #00532c;
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(0, 104, 55, 0.35);
    }

    .p-btn-zalo:hover {
        background: #006837;
        color: #ffffff;
        box-shadow: 0 4px 14px rgba(0, 104, 55, 0.25);
    }

    .p-content-box {
        padding: 32px;
        margin-bottom: 36px;
    }

    .p-content-heading {
        font-size: 18px;
    }

    .p-related-section {
        margin-bottom: 48px;
    }

    .p-related-title {
        font-size: 20px;
    }
}

/* ===================================================
   4. LARGE SCREENS (@media min-width: 1200px)
   =================================================== */
@media (min-width: 1200px) {
    .shop-layout {
        gap: 36px;
    }

    .shop-products-grid {
        gap: 24px;
    }

    .shop-card-body {
        padding: 18px 20px 20px;
    }

    .shop-card-title {
        font-size: 16px;
        min-height: 42px;
    }

    .shop-price-main {
        font-size: 17px;
    }

    .shop-card-btn {
        padding: 11px 18px;
        font-size: 13.5px;
    }

    .p-detail-layout {
        gap: 40px;
    }
}
