/**
 * AlstonBlack - Product & Listing Styles
 * @version 1.0.0
 */

/* ===== PAGE HEADER ===== */
.nr-page-header { background: var(--qx-primary); color: var(--qx-white); padding: 48px 0; }
.st-page-title { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.lm-breadcrumb-bar { background: #f9f7f3; padding: 12px 0; border-bottom: 1px solid var(--qx-border); }

/* ===== FILTERS ===== */
.kp-filters { background: var(--qx-white); padding: 20px 0; border-bottom: 1px solid var(--qx-border); position: sticky; top: 0; z-index: 50; }
.zv-filter-form {}
.nr-filter-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.st-search-wrap { flex: 1; min-width: 200px; }
.qx-search-input { width: 100%; padding: 9px 14px; border: 1px solid var(--qx-border); border-radius: 4px; font-size: 14px; }
.qx-search-input:focus { outline: none; border-color: var(--qx-primary); }
.lm-sort-wrap { display: flex; align-items: center; gap: 8px; }
.kp-sort-label { font-size: 13px; color: #718096; white-space: nowrap; }
.zv-sort-select { padding: 9px 14px; border: 1px solid var(--qx-border); border-radius: 4px; font-size: 14px; cursor: pointer; }
.nr-results-count { font-size: 13px; color: #718096; white-space: nowrap; margin-left: auto; }

/* ===== PRODUCT GRID ===== */
.st-product-section { padding: 48px 0; }
.zv-product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 48px; }

.nr-product-card { background: var(--qx-white); border-radius: 8px; overflow: hidden; box-shadow: var(--qx-shadow); transition: var(--qx-transition); display: flex; flex-direction: column; }
.nr-product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.12); }

.qx-card-img-wrap { position: relative; overflow: hidden; aspect-ratio: 3/4; background: #f0ede6; }
.lm-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.nr-product-card:hover .lm-card-img { transform: scale(1.05); }
.kp-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--qx-border); }
.zv-card-hover { position: absolute; inset: 0; background: rgba(26,54,93,.4); display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--qx-transition); }
.nr-product-card:hover .zv-card-hover { opacity: 1; }
.nr-view-btn { color: var(--qx-white); border: 2px solid var(--qx-white); padding: 10px 22px; border-radius: 4px; font-size: 13px; }

.st-card-body { padding: 20px; flex: 1; }
.qx-card-name { font-size: 17px; color: var(--qx-primary); margin-bottom: 8px; }
.lm-card-desc { font-size: 13px; color: #718096; margin-bottom: 12px; line-height: 1.5; }
.kp-price-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zv-sale-price { color: #e53e3e; font-weight: 700; font-size: 17px; }
.nr-orig-price { text-decoration: line-through; color: #a0aec0; font-size: 14px; }
.st-sale-badge { background: #e53e3e; color: white; font-size: 11px; padding: 2px 7px; border-radius: 3px; font-weight: 700; letter-spacing: .05em; }
.qx-regular-price { font-weight: 700; font-size: 17px; color: var(--qx-text); }

.lm-card-actions { padding: 0 20px 20px; }
.kp-add-btn { display: block; width: 100%; text-align: center; background: var(--qx-primary); color: var(--qx-white); padding: 11px; border-radius: 4px; font-weight: 700; font-size: 14px; transition: var(--qx-transition); }
.kp-add-btn:hover { background: #2d5a8e; }

/* ===== EMPTY STATE ===== */
.qx-empty-state { text-align: center; padding: 80px 20px; }
.qx-empty-state p { color: #718096; margin-bottom: 24px; font-size: 17px; }

/* ===== PAGINATION ===== */
.zv-pagination { margin-top: 48px; }
.nr-page-list { display: flex; justify-content: center; gap: 8px; list-style: none; flex-wrap: wrap; }
.st-page-link { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--qx-border); border-radius: 4px; font-size: 14px; color: var(--qx-text); transition: var(--qx-transition); }
.st-page-link:hover { border-color: var(--qx-primary); color: var(--qx-primary); }
.st-page-link.qx-active { background: var(--qx-primary); color: var(--qx-white); border-color: var(--qx-primary); }

/* ===== PRODUCT DETAIL ===== */
.nr-product-section { padding: 48px 0; }
.st-product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: flex-start; margin-bottom: 64px; }

/* Gallery */
.qx-gallery {}
.lm-main-img-wrap { border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: #f0ede6; margin-bottom: 12px; }
.kp-main-img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .4s ease; }
.kp-main-img:hover { transform: scale(1.03); }

.zv-thumbnails { display: flex; gap: 8px; flex-wrap: wrap; }
.nr-thumb { width: 72px; height: 72px; border: 2px solid transparent; border-radius: 6px; overflow: hidden; padding: 0; cursor: pointer; transition: var(--qx-transition); background: none; }
.nr-thumb:hover, .nr-thumb.active { border-color: var(--qx-primary); }
.nr-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Product Info */
.st-product-info {}
.qx-product-name { font-size: clamp(24px, 3.5vw, 32px); color: var(--qx-primary); margin-bottom: 16px; }

.lm-price-block { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.kp-sale-price { font-size: 26px; font-weight: 700; color: #e53e3e; }
.zv-orig-price { font-size: 18px; text-decoration: line-through; color: #a0aec0; }
.nr-sale-tag { background: #e53e3e; color: white; font-size: 12px; padding: 3px 8px; border-radius: 3px; font-weight: 700; }
.st-product-price { font-size: 26px; font-weight: 700; color: var(--qx-text); }

.qx-short-desc { color: #718096; line-height: 1.7; margin-bottom: 24px; font-size: 15px; }

/* Variants */
.lm-variant-group { margin-bottom: 20px; }
.kp-variant-label { font-size: 14px; font-weight: 600; color: var(--qx-text); margin-bottom: 10px; }
.zv-selected-val { color: var(--qx-primary); font-weight: 700; }
.nr-variant-options { display: flex; gap: 8px; flex-wrap: wrap; }
.st-variant-btn { padding: 8px 16px; border: 1px solid var(--qx-border); border-radius: 4px; background: var(--qx-white); font-size: 14px; cursor: pointer; transition: var(--qx-transition); }
.st-variant-btn:hover:not([disabled]) { border-color: var(--qx-primary); }
.st-variant-btn.selected { background: var(--qx-primary); color: var(--qx-white); border-color: var(--qx-primary); }
.st-variant-btn[disabled] { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

/* Quantity */
.qx-qty-block { margin-bottom: 20px; }
.lm-qty-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.kp-qty-wrap { display: flex; align-items: center; gap: 0; width: fit-content; border: 1px solid var(--qx-border); border-radius: 4px; overflow: hidden; }
.zv-qty-btn { width: 40px; height: 40px; border: none; background: #f7f5f0; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--qx-transition); }
.zv-qty-btn:hover { background: var(--qx-border); }
.nr-qty-input { width: 56px; height: 40px; border: none; border-left: 1px solid var(--qx-border); border-right: 1px solid var(--qx-border); text-align: center; font-size: 16px; }
.nr-qty-input:focus { outline: none; }

/* Stock */
.st-stock-status { margin-bottom: 24px; font-size: 14px; }
.qx-in-stock { color: #38a169; font-weight: 600; }
.lm-low-stock { color: #dd6b20; font-weight: 600; }
.kp-out-stock { color: #e53e3e; font-weight: 600; }

/* Add to Cart */
.zv-add-to-cart { display: block; width: 100%; padding: 16px; background: var(--qx-primary); color: var(--qx-white); border: none; border-radius: 4px; font-size: 16px; font-weight: 700; cursor: pointer; transition: var(--qx-transition); letter-spacing: .03em; margin-bottom: 20px; }
.zv-add-to-cart:hover:not([disabled]) { background: #2d5a8e; transform: translateY(-1px); }
.zv-add-to-cart[disabled] { opacity: .5; cursor: not-allowed; }

/* Trust Badges */
.nr-trust-badges { display: flex; gap: 16px; flex-wrap: wrap; }
.st-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #718096; }

/* Toast */
.nr-toast { position: fixed; bottom: 32px; right: 32px; background: var(--qx-primary); color: var(--qx-white); padding: 16px 24px; border-radius: 8px; display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 1000; animation: slideIn .3s ease; }
.st-toast-icon { color: #68d391; font-size: 18px; }
.qx-toast-msg { font-size: 15px; }
.lm-toast-link { color: var(--qx-accent); font-weight: 700; white-space: nowrap; }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Tabs */
.qx-tabs { margin-bottom: 64px; }
.lm-tab-nav { display: flex; border-bottom: 2px solid var(--qx-border); margin-bottom: 32px; }
.kp-tab { padding: 12px 24px; border: none; background: none; font-size: 15px; font-weight: 600; color: #718096; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--qx-transition); }
.kp-tab.active { color: var(--qx-primary); border-bottom-color: var(--qx-accent); }
.nr-tab-panel { line-height: 1.8; color: var(--qx-text); }
.nr-tab-panel[hidden] { display: none; }
.st-desc-body { max-width: 720px; }
.qx-detail-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.qx-detail-list li { padding: 8px 0; border-bottom: 1px solid var(--qx-border); font-size: 15px; }

/* Related */
.lm-related { margin-bottom: 64px; }
.kp-related-title { font-size: 28px; color: var(--qx-primary); margin-bottom: 32px; }
.zv-related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.nr-related-card { text-align: center; }
.st-rel-link { display: block; }
.qx-rel-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; margin-bottom: 10px; transition: transform .3s ease; }
.nr-related-card:hover .qx-rel-img { transform: scale(1.03); }
.kp-rel-name { font-size: 15px; color: var(--qx-primary); margin-bottom: 6px; }
.zv-rel-price { font-weight: 700; font-size: 15px; color: var(--qx-text); }
.lm-rel-placeholder { width: 100%; aspect-ratio: 1; background: var(--qx-border); border-radius: 6px; margin-bottom: 10px; }

/* ===== CART MODAL ===== */
.nr-cart-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; }
.nr-cart-modal[hidden] { display: none; }
.st-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.qx-modal-box { position: relative; background: var(--qx-white); border-radius: 10px; padding: 36px; width: 380px; max-width: 90vw; box-shadow: 0 20px 60px rgba(0,0,0,.2); text-align: center; }
.lm-modal-header { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
.kp-modal-check { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: #c6f6d5; border-radius: 50%; color: #22543d; font-size: 18px; font-weight: 700; }
.zv-modal-title { font-size: 22px; color: var(--qx-primary); margin: 0; }
.nr-modal-item { color: #718096; font-size: 15px; margin-bottom: 28px; }
.st-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.qx-modal-continue { background: none; border: 2px solid var(--qx-border); color: var(--qx-text); padding: 12px; border-radius: 4px; font-size: 15px; font-weight: 600; cursor: pointer; transition: var(--qx-transition); }
.qx-modal-continue:hover { border-color: var(--qx-primary); color: var(--qx-primary); }
.lm-modal-checkout { display: block; background: var(--qx-accent); color: var(--qx-white); padding: 13px; border-radius: 4px; font-size: 15px; font-weight: 700; transition: var(--qx-transition); }
.lm-modal-checkout:hover { background: #b8901f; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .st-product-layout { grid-template-columns: 1fr; gap: 32px; }
    .zv-product-grid { grid-template-columns: repeat(2, 1fr); }
    .zv-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .zv-product-grid { grid-template-columns: 1fr; }
    .zv-related-grid { grid-template-columns: repeat(2, 1fr); }
    .nr-filter-row { flex-direction: column; align-items: stretch; }
    .nr-results-count { margin-left: 0; }
}