/* ==============================
   Winsurf eMarket - Product Components
   ============================== */

/* Product Card */
.product-card {
    background: var(--surface);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    box-shadow: none;
    --rx: 0deg;
    --ry: 0deg;
    /* 3D tilt base */
    transform-style: preserve-3d;
    perspective: 800px;
    transition: transform 0.18s ease, box-shadow 0.35s ease, border-color 0.3s ease;
    will-change: transform;
    cursor: pointer;
}

/* Always-visible color accent bar */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff5a5f 0%, #ff9f43 50%, #e74c3c 100%);
    z-index: 2;
    pointer-events: none;
}

/* Shimmer sweep on hover */
.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: none;
    pointer-events: none;
    z-index: 3;
}

.product-card:hover::after {
    animation: cardShimmer 0.65s ease forwards;
}

@keyframes cardShimmer {
    0% {
        left: -75%;
    }

    100% {
        left: 130%;
    }
}

.product-card:hover {
    box-shadow:
        0 20px 50px rgba(231, 76, 60, 0.24),
        0 8px 24px rgba(0, 0, 0, 0.12);
    /* JS applies rotateX/rotateY dynamically */
    transform: translateY(-12px) scale(1.025) rotateX(var(--rx)) rotateY(var(--ry));
}

.product-card__thumb {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--surface-2);
    padding: 8px;
}

.product-card__thumb img {
    width: calc(100% - 0px);
    height: calc(100% - 0px);
    object-fit: cover;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 8px;
}

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

.product-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.product-card__badges .badge-sale {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    background: radial-gradient(circle at 30% 30%, #ff9c8f 0%, #e74c3c 60%, #b93225 100%);
    color: #fff;
    border: none;
    box-shadow: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.product-card__actions {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(18px) scale(0.8);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 2;
}

.product-card:hover .product-card__actions {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Stagger each action button */
.product-card__actions button:nth-child(1) {
    transition-delay: 0s;
}

.product-card__actions button:nth-child(2) {
    transition-delay: 0.06s;
}

.product-card__actions button:nth-child(3) {
    transition-delay: 0.12s;
}

.product-card__actions button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}

.product-card__actions button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.product-card__quick {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    z-index: 2;
}

.product-card:hover .product-card__quick {
    transform: translateY(0);
}

.product-card__quick:hover {
    background: linear-gradient(90deg, var(--primary-dark), var(--secondary));
    letter-spacing: 1.4px;
    transition: letter-spacing 0.2s ease, background 0.3s ease;
}

.product-card__body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    min-height: 170px;
}

.product-card__cat {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.product-card__name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.38;
    min-height: 2.76em;
}

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

.product-card__brand {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.35px;
    margin-bottom: 8px;
}

.product-card__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.product-card__rating span {
    font-size: 11px;
    color: var(--text-muted);
}

.product-card__rating i {
    color: #e74c3c;
}

.product-card__price {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 6px;
    margin-bottom: 10px;
    min-width: 0;
}

.price-sale {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    transition: transform 0.25s ease, text-shadow 0.25s ease;
}

.product-card:hover .price-sale {
    transform: scale(1.08);
    text-shadow: 0 2px 8px rgba(231, 76, 60, 0.35);
}

.price-old {
    font-size: 13px;
    text-decoration: line-through;
    color: var(--text-light);
}

.product-card__footer {
    display: block;
    margin-top: auto;
}

.btn-add-cart {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 9px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 0;
    white-space: normal;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

/* Product List View */
.product-list-card {
    display: flex;
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.product-list-card:hover {
    box-shadow: var(--shadow-lg);
}

.product-list-card__thumb {
    width: 120px;
    flex-shrink: 0;
    position: relative;
}

.product-list-card__thumb img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: var(--radius);
}

.product-list-card__body {
    flex: 1;
}

/* Feature Bar */
.feature-bar {
    background: var(--surface);
    border-top: 3px solid var(--primary);
}

.feature-bar .container,
.feature-bar .container-fluid {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

.feature-item {
    flex: 1;
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 14px;
    padding: 20px 16px;
    border-right: 1px solid var(--border);
}

.feature-item:last-child {
    border-right: none;
}

.feature-item > div {
    display: block;
    min-width: 0;
    white-space: normal;
}

.feature-item i {
    font-size: 30px;
    color: var(--primary);
}

.feature-item strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.feature-item span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

/* Daily Deals Section */
.daily-deals {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.deals-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.deals-header h2 {
    font-size: 18px;
    text-transform: uppercase;
}

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

.countdown-item {
    text-align: center;
    background: var(--secondary);
    color: #fff;
    padding: 6px 10px;
    border-radius: var(--radius);
    min-width: 42px;
}

.countdown-item .num {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    display: block;
}

.countdown-item .lbl {
    font-size: 9px;
    text-transform: uppercase;
    opacity: 0.8;
}

.countdown-sep {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
}

.deal-card {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.deal-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.deal-card__img {
    width: 90px;
    flex-shrink: 0;
}

.deal-card__img img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: var(--radius);
}

.deal-card__body {
    flex: 1;
}

.deal-card__name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}

.deal-card__name a:hover {
    color: var(--primary);
}

.deal-card__price {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.deal-card__price .new {
    color: var(--primary);
    font-weight: 700;
    font-size: 15px;
}

.deal-card__price .old {
    color: var(--text-light);
    text-decoration: line-through;
    font-size: 13px;
}

.progress-bar {
    background: #eee;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}

.progress-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* Category Grid Boxes */
.cat-box-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.cat-box-grid-scroll {
    display: flex;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 4px;
}

.cat-box-grid-scroll::-webkit-scrollbar {
    height: 6px;
}

.cat-box-grid-scroll::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 10px;
}

.cat-box-grid-scroll .cat-box {
    flex: 0 0 170px;
    min-width: 170px;
}

.cat-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 10px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.cat-box:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.cat-box img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0 auto 10px;
}

.cat-box span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.cat-box__count {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.cat-box:hover span {
    color: var(--primary);
}

@media (max-width: 768px) {
    .cat-box-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Side Products Column (Latest/Top Rated) */
.side-product {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.side-product:last-child {
    border-bottom: none;
}

.side-product__img {
    width: 80px;
    flex-shrink: 0;
}

.side-product__img img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: var(--radius);
}

.side-product__body .name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.side-product__body .name a:hover {
    color: var(--primary);
}

.side-product__body .price {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

/* Blog Post */
.blog-card {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.blog-card:last-child {
    border-bottom: none;
}

.blog-card__meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.blog-card__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.blog-card__title a:hover {
    color: var(--primary);
}

/* Product Grid Section */
.products-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.products-grid .product-card,
.products-grid--oneline .product-card {
    height: 100%;
}

.products-grid--oneline {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: hidden;
    overflow-y: hidden;
    padding-bottom: 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.products-grid--oneline .product-card {
    flex: 0 0 calc((100% - 48px) / 5);
    min-width: calc((100% - 48px) / 5);
}

.products-grid--oneline::-webkit-scrollbar {
    display: none;
}

.products-grid--oneline::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 10px;
}

.products-grid--oneline .product-card.is-rotating-out {
    opacity: 0.15;
    pointer-events: none;
}

.daily-deals-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    padding-bottom: 0;
}

.daily-deals-row .deal-card {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-bottom: 1px solid var(--border);
    min-width: 0;
    gap: 8px;
}

.daily-deals-row .deal-card__img {
    width: 66px;
    flex: 0 0 66px;
    margin-bottom: 0;
}

.daily-deals-row .deal-card__img img {
    width: 100%;
    height: 66px;
    aspect-ratio: auto;
    object-fit: cover;
    border-radius: 6px;
}

.daily-deals-row .deal-card__body {
    min-width: 0;
    flex: 1;
}

.daily-deals-row .deal-card__name {
    font-size: 12px;
    margin-bottom: 3px;
    line-height: 1.3;
}

.daily-deals-row .deal-card__name a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.daily-deals-row .deal-card__price .new {
    font-size: 13px;
}

.daily-deals-row .deal-card__price .old {
    font-size: 11px;
}

.daily-deals-row .progress-label {
    font-size: 10px;
    margin-bottom: 0;
}

@media (max-width: 1200px) {
    .daily-deals-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .daily-deals-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .daily-deals-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .daily-deals-row {
        grid-template-columns: 1fr;
    }
}

.deals-header-inline {
    align-items: flex-start;
}

.category-products-block {
    margin-bottom: 16px;
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .products-grid--oneline {
        gap: 12px;
    }

    .products-grid--oneline .product-card {
        flex-basis: calc((100% - 36px) / 4);
        min-width: calc((100% - 36px) / 4);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid--oneline .product-card {
        flex-basis: calc((100% - 24px) / 3);
        min-width: calc((100% - 24px) / 3);
    }
}

@media (max-width: 480px) {
    .products-grid--oneline .product-card {
        flex-basis: calc((100% - 12px) / 2);
        min-width: calc((100% - 12px) / 2);
    }
}

/* Promo Banners */

.promo-banner {
    flex: 1;
    overflow: hidden;
    border-radius: var(--radius);
    position: relative;
    height: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;
}

.promo-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.promo-banner:hover img {
    transform: scale(1.05);
}

.promo-overlay {
    position: absolute;
    inset: 0;
    padding: 20px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.55) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.promo-overlay .sub {
    font-size: 11px;
    opacity: 0.85;
    margin-bottom: 4px;
}

.promo-overlay .title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .promo-banner {
        height: 145px !important;
        min-height: 145px !important;
        max-height: 145px !important;
    }
}

/* Newsletter */
.newsletter {
    background: var(--secondary);
}

.newsletter .container {
    display: block;
}

.newsletter__text h2 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 5px;
}

.newsletter__text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.newsletter__form {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 560px;
    margin-left: auto;
}

.newsletter__form input {
    flex: 1;
    min-width: 0;
    padding: 13px 18px;
    border: none;
    outline: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 14px;
}

.newsletter__form button {
    padding: 13px 26px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-weight: 600;
}

.newsletter__form button:hover {
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .newsletter__text {
        text-align: center;
    }

    .newsletter__form {
        width: 100%;
        max-width: none;
        margin-left: 0;
        flex-direction: column;
        gap: 10px;
    }

    .newsletter__form input,
    .newsletter__form button {
        width: 100%;
        border-radius: var(--radius);
    }
}

/* Footer */
footer {
    background: #1a2332;
    color: rgba(255, 255, 255, 0.75);
    padding: 50px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.footer-col p {
    font-size: 13px;
    line-height: 1.8;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 10px;
    margin-bottom: 16px;
}

.store-logo-footer {
    display: block;
    height: 72px !important;
    max-height: 72px !important;
    width: auto !important;
    max-width: 300px !important;
    object-fit: contain;
}

.footer-brand .logo-text {
    font-size: 28px;
    color: #fff;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

#footer-branch-addresses li {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.55;
}

#footer-branch-addresses li strong {
    color: rgba(255, 255, 255, 0.92);
}

.footer-col ul li a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-col ul li a::before {
    content: '>';
    margin-right: 6px;
    color: var(--primary);
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.footer-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ccc;
}

.footer-social a:hover {
    background: var(--primary);
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-bottom a {
    color: var(--primary);
}

.payment-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-icons i {
    font-size: 38px;
    color: #ffffff;
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.35));
    opacity: 0.98;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.payment-icons i:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 6px 14px rgba(255, 255, 255, 0.45));
}

.payment-icons .fa-cc-visa {
    color: #8dc2ff;
}

.payment-icons .fa-cc-mastercard {
    color: #ffc07f;
}

.payment-icons .fa-cc-paypal {
    color: #7fd3ff;
}

.payment-icons .fa-cc-amex {
    color: #b2ecff;
}

.payment-icons .fa-cc-apple-pay {
    color: #eaf2ff;
}

@media (max-width: 768px) {
    .feature-bar .container,
    .feature-bar .container-fluid {
        overflow-x: auto;
    }

    .feature-item {
        flex: 0 0 auto;
        padding: 16px 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   CARD ENTRANCE ANIMATION (scroll-triggered)
   ============================================================ */
@keyframes cardPopIn {
    0% {
        opacity: 0;
        transform: translateY(26px) scale(0.86) rotate(-3deg);
    }

    60% {
        opacity: 1;
        transform: translateY(-4px) scale(1.03) rotate(1deg);
    }

    80% {
        transform: scale(0.97) rotate(-0.5deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.product-card {
    /* Keep cards visible by default; JS class can still animate them */
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.product-card.card-visible {
    animation: cardPopIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    /* end state */
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.product-card.card-enter {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
}

/* staggered delay applied inline by JS */

/* ==============================
   Products Page Layout
   ============================== */
.products-page-wrap {
    padding-top: 16px;
}

.products-page-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.products-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    position: sticky;
    top: 90px;
}

.products-sidebar__head {
    display: block;
    margin-bottom: 10px;
}

.products-sidebar__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.products-sidebar__scroll {
    display: block;
}

.products-sidebar__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.products-sidebar__head h2,
.products-sidebar__head h3 {
    font-size: 16px;
    margin: 0;
}

.products-sidebar__close {
    border: none;
    background: transparent;
    font-size: 18px;
    color: var(--text-muted);
}

.products-filter-group {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.products-filter-group:last-of-type {
    border-bottom: none;
}

.products-filter-group h4 {
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 700;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 190px;
    overflow-y: auto;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}

.filter-options label input[type="checkbox"] {
    flex: 0 0 auto;
}

.filter-options label span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.products-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

.products-content__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 0;
}

.products-content__top h2 {
    margin: 0;
    font-size: 22px;
    white-space: nowrap;
    flex-shrink: 0;
}

.products-result-count {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.products-search-note {
    margin: 3px 0 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.products-content__controls {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    margin-left: auto;
}

.products-sort-label {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

#sort-select {
    min-width: 150px;
    max-width: 200px;
}

.applied-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    min-height: 36px;
    align-items: center;
}

.applied-filters:empty {
    display: none;
}

.applied-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: #fff7f6;
    color: #8f2d24;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
}

.applied-chip button {
    border: none;
    background: transparent;
    color: inherit;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.products-grid--catalog {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.products-empty {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 28px 14px;
    text-align: center;
}

.products-empty p {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.products-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.products-pagination:empty {
    display: none;
}

.pagination-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 8px;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.pagination-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pagination-gap {
    color: var(--text-muted);
    font-size: 12px;
    padding: 0 2px;
}

.products-filter-backdrop {
    display: none;
}

#open-filter-drawer,
#apply-filters-mobile,
#clear-all-filters {
    min-height: 44px;
}

#clear-all-filters {
    border: 1px solid #dc3545 !important;
    background: #fff;
    color: #dc3545;
}

#clear-all-filters:hover {
    background: #dc3545;
    color: #fff;
}

@media (max-width: 1199px) {
    .products-grid--catalog {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .products-page-layout {
        grid-template-columns: 1fr;
    }

    .products-sidebar {
        position: fixed;
        top: 0;
        left: -110%;
        width: min(86vw, 340px);
        height: 100vh;
        z-index: 1200;
        overflow-y: auto;
        border-radius: 0;
        transition: left 0.28s ease;
        display: flex;
        flex-direction: column;
        padding: 0;
    }

    .products-sidebar.open {
        left: 0;
    }

    .products-filter-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.34);
        z-index: 1150;
    }

    .products-filter-backdrop.show {
        display: block;
    }

    .products-grid--catalog {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .applied-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .applied-filters::-webkit-scrollbar {
        display: none;
    }

    .products-sidebar .btn {
        min-height: 30px;
    }

    .products-sidebar__scroll {
        flex: 1;
        overflow-y: auto;
        padding: 0 25px;
    }

    .products-sidebar__actions {
        position: sticky;
        bottom: 0;
        z-index: 3;
        background: #fff;
        border-top: 1px solid var(--border);
        padding-top: 5px;
        margin-top: 4px;
        padding-bottom: calc(6px + env(safe-area-inset-bottom));
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .products-sidebar__actions .btn {
        flex: 1 1 0;
        width: auto !important;
        white-space: nowrap;
        min-height: 34px;
        font-size: 15px;
        line-height: 1.1;
        padding: 4px 6px;
    }

    .products-sidebar__head {
        margin-bottom: 0;
        position: sticky;
        top: 0;
        z-index: 4;
        background: #fff;
    }

    .products-sidebar__title-row {
        display: none;
    }

    .products-sidebar .mobile-sidebar-brand {
        padding: 4px 44px 8px 12px;
        border-bottom: 1px solid #f2f2f2;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        position: relative;
    }

    .products-sidebar .mobile-filter-top-title {
        width: 100%;
        font-size: 12px;
        font-weight: 700;
        color: var(--text);
        line-height: 1;
        text-align: left;
    }

    .products-sidebar .mobile-sidebar-brand__link {
        width: auto;
    }

    .products-sidebar .mobile-sidebar-brand__link img {
        height: 42px;
    }

    .products-sidebar .mobile-sidebar-brand .products-sidebar__close {
        position: absolute;
        top: 2px;
        right: 8px;
        width: 34px;
        height: 34px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #fff;
        color: var(--text-muted);
        font-size: 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .products-content {
        padding: 12px;
    }

    .products-content__top {
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .products-content__controls {
        justify-content: flex-end;
        width: auto;
    }

    .products-filter-btn-text {
        display: none;
    }

    #open-filter-drawer {
        min-width: 38px;
        padding: 0 10px;
    }

    #sort-select {
        min-width: 118px;
        width: 118px;
        max-width: 118px;
    }

    .products-grid--catalog {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Mobile card fixes: keep compact single-line text */
    .product-card__name {
        font-size: 12px;
        line-height: 1.25;
        min-height: 1.25em;
        -webkit-line-clamp: 1;
    }

    .product-card__name a {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-card__price {
        flex-wrap: nowrap;
        white-space: nowrap;
        gap: 4px;
        overflow: hidden;
    }

    .price-sale {
        font-size: 12px;
        line-height: 1.2;
    }

    .price-old {
        font-size: 10px;
        line-height: 1.2;
    }
}

/* ============================================================
   PROMO BANNER INTERACTIVE TRANSITIONS
   ============================================================ */

/* Left banner – slides in from the left */
.promo-banner.promo-left {
    opacity: 0;
    transform: translateX(-90px);
    transition: opacity 1.0s ease, transform 1.0s cubic-bezier(0.22, 1, 0.36, 1);
}

.promo-banner.promo-left.promo-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Right banner – slides in from the right */
.promo-banner.promo-right {
    opacity: 0;
    transform: translateX(90px);
    transition: opacity 1.0s ease, transform 1.0s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0.25s;
}

.promo-banner.promo-right.promo-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Middle banner – zoom-from-centre */
.promo-banner.promo-mid {
    opacity: 0;
    transform: scale(0.78);
    transition: opacity 1.0s ease, transform 1.0s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0.15s;
}

.promo-banner.promo-mid.promo-visible {
    opacity: 1;
    transform: scale(1);
}

/* Extra hover lift for all promo banners */
.promo-banner:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.promo-banner.promo-mid:hover img {
    transform: scale(1.1);
}

.promo-banner.promo-left:hover img,
.promo-banner.promo-right:hover img {
    transform: scale(1.07) translateX(4px);
}

/* ============================================================
   CATEGORY BOX ENTRANCE
   ============================================================ */
@keyframes catBoxIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.85);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cat-box {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.cat-box.cat-visible {
    animation: catBoxIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ==============================
   Single Product Page
   ============================== */
.single-product-page {
    background: transparent;
}

.sp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.sp-breadcrumb a {
    color: var(--text-muted);
}

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

.sp-breadcrumb a.disabled {
    pointer-events: none;
    opacity: 0.7;
}

.sp-page-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--text);
}

.single-product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
}

/* Keep visible space between gallery column and details column */
.single-product-card .row {
    --bs-gutter-x: 2rem;
}

.sp-main-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    overflow: hidden;
    cursor: zoom-in;
}

.sp-main-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: 50% 50%;
    transition: transform 0.18s ease-out;
    will-change: transform;
}

.sp-main-image-wrap.is-zoomed img {
    transform: scale(2);
}

.sp-thumbs {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.sp-thumb {
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    padding: 6px;
    aspect-ratio: 1 / 1;
}

.sp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sp-thumb.active,
.sp-thumb:hover {
    border-color: var(--primary);
}

.sp-product-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
}

.sp-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.sp-price-new {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.sp-price-old {
    font-size: 18px;
    color: var(--text-light);
    text-decoration: line-through;
}

.sp-discount {
    font-size: 12px;
    font-weight: 700;
    background: #fdf1ef;
    color: var(--primary);
    border: 1px solid #f6d4ce;
    border-radius: 999px;
    padding: 3px 10px;
}

.sp-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.sp-stars i {
    color: #e74c3c;
    font-size: 13px;
}

.sp-reviews {
    font-size: 13px;
    color: var(--text-muted);
}

.sp-spec-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
}

.sp-spec-list li {
    color: var(--text);
    font-size: 14px;
}

#sp-stock.is-out {
    color: var(--danger);
    font-weight: 700;
}

#sp-stock.is-in {
    color: #1f8b4c;
    font-weight: 700;
}

.sp-variation-values {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.sp-variation-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border: 1px solid #e3e3e3;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.sp-variation-pill.is-selected {
    border-color: #e74c3c;
    color: #e74c3c;
    background: #fff7f6;
}

.sp-qty-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.sp-qty-label {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.sp-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    overflow: hidden;
}

.sp-qty-control button {
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    font-size: 18px;
    line-height: 1;
    color: var(--text);
}

.sp-qty-control button:hover {
    background: #f7f7f7;
}

#sp-qty-input {
    width: 56px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

#sp-qty-input:focus {
    outline: none;
}

.sp-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.sp-actions .btn {
    min-width: 170px;
}

#sp-buy-now {
    border: 2px solid #e74c3c !important;
    color: #e74c3c;
    background: #fff;
}

#sp-buy-now:hover,
#sp-buy-now:focus {
    background: #e74c3c;
    color: #fff;
}

.sp-contact-info p {
    margin: 0 0 5px;
    font-size: 14px;
    color: var(--text-muted);
}

.sp-contact-info p i {
    color: var(--primary);
    width: 18px;
}

.sp-contact-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.sp-contact-btn {
    width: 54%;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
}

#sp-contact-call-btn {
    border: 2px solid var(--primary) !important;
}

.sp-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
}

.sp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.sp-section-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
}

.sp-section-title i {
    color: var(--primary);
    margin-right: 6px;
}

.sp-description-body h3 {
    font-size: 16px;
    margin: 0 0 8px;
}

.sp-description-body ul {
    margin: 0 0 10px;
    padding-left: 20px;
    color: var(--text-muted);
}

.sp-description-body li {
    margin-bottom: 4px;
}

.sp-similar-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.sp-review-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #fff8f6;
    border: 1px solid #f5d8d3;
    border-radius: 999px;
    padding: 6px 12px;
}

.sp-review-summary__avg {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.sp-review-summary__stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.sp-review-summary__stars i {
    color: #e74c3c;
    font-size: 12px;
}

.sp-review-summary__count {
    font-size: 12px;
    color: var(--text-muted);
}

.sp-review-form-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.sp-review-form-wrap h4 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
}

.sp-review-form {
    display: grid;
    gap: 10px;
}

.sp-review-form__row {
    display: grid;
    gap: 6px;
}

.sp-review-form__row label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.sp-review-form__row textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    resize: vertical;
    min-height: 100px;
}

.sp-review-form__row textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.12);
}

.sp-review-form__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.sp-review-note {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.sp-review-note a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.sp-review-list {
    display: grid;
    gap: 10px;
}

.sp-review-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
}

.sp-review-item__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.sp-review-item__name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.sp-review-item__date {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.sp-review-item__stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: 3px;
}

.sp-review-item__stars i {
    font-size: 12px;
    color: #e74c3c;
}

.sp-review-item__body {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    white-space: pre-line;
}

.sp-review-empty {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 991px) {
    .single-product-card .row {
        --bs-gutter-x: 1.25rem;
    }

    .sp-page-title {
        font-size: 24px;
    }

    .sp-product-name {
        font-size: 22px;
    }

    .sp-price-new {
        font-size: 24px;
    }

    .sp-similar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sp-review-summary {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 575px) {
    .single-product-card .row {
        --bs-gutter-x: 1rem;
    }

    .single-product-card,
    .sp-section {
        padding: 12px;
    }

    .sp-thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sp-actions {
        flex-direction: column;
    }

    .sp-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .sp-contact-btn {
        width: 100%;
    }

    .sp-qty-wrap {
        flex-wrap: wrap;
    }

    .sp-section-head {
        flex-wrap: wrap;
    }

    .sp-similar-grid {
        grid-template-columns: 1fr;
    }
}
