.count-box {
    display: none; /* Hide by default, will be shown by JS if count > 0 */
}

.count-box.has-items {
    display: inline-block !important;
}

/* Quantity Controls (+ - buttons) */
.wg-quantity {
    display: flex;
    align-items: center;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    background: white;
}

.wg-quantity.small {
    height: 32px;
    max-width: 100px;
}

.wg-quantity .btn-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 100%;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.2s ease;
    user-select: none;
}

.wg-quantity .btn-quantity:hover {
    background: #e9ecef;
    color: #000;
}

.wg-quantity .btn-quantity:active {
    background: #dee2e6;
}

.wg-quantity input[type="text"] {
    border: none;
    outline: none;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    width: 44px;
    height: 100%;
    background: white;
    color: #333;
}

.wg-quantity input[type="text"]:focus {
    outline: none;
    box-shadow: none;
}

/* Remove button styling */
.tf-mini-cart-remove {
    color: #999;
    font-size: 12px;
    cursor: pointer;
    margin-top: 4px;
    transition: color 0.2s ease;
}

.tf-mini-cart-remove:hover {
    color: #dc3545;
}

/* Mini cart buttons container */
.tf-mini-cart-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

/* Breadcrumb divider override (avoid URL showing as divider) */
.breadcrumb {
    --bs-breadcrumb-divider: "/";
}

/* Modern categories circle - one line, no scroll */
.modern-categories .modern-categories-wrap {
    overflow: hidden;
    align-items: center;
    gap: 8px;
}

.modern-categories .modern-categories-container {
    overflow: hidden;
    flex-wrap: nowrap;
    gap: 8px;
}

.modern-categories .collection-item-circle {
    min-width: 98px;
}

.modern-categories .collection-item-circle .has-saleoff-wrap,
.modern-categories .collection-item-circle .collection-image {
    width: 62px;
    height: 62px;
}

.modern-categories .collection-item-circle img {
    max-width: 64px;
}

.modern-categories .collection-content {
    margin-top: 10px !important;
}

.modern-categories .collection-content a {
    font-size: 12px !important;
    line-height: 14px !important;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 92px;
}

/* Mini cart item compact style */
.modal-shopping-cart .tf-mini-cart-item {
    padding: 10px 0;
}

.modal-shopping-cart .tf-mini-cart-image img {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.modal-shopping-cart .tf-mini-cart-image {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
}

.modal-shopping-cart .tf-mini-cart-info .title,
.modal-shopping-cart .tf-mini-cart-info .title.link {
    font-size: 13px;
    line-height: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-shopping-cart .tf-mini-cart-info .price {
    font-size: 12px;
    line-height: 14px;
}

.modal-shopping-cart .tf-mini-cart-info .meta-variant {
    font-size: 11px;
    line-height: 13px;
}

.modal-shopping-cart .tf-mini-cart-btns {
    gap: 6px;
}

.modal-shopping-cart .wg-quantity.small {
    height: 26px;
}

.modal-shopping-cart .wg-quantity .btn-quantity {
    width: 22px;
    font-size: 12px;
}

.modal-shopping-cart .wg-quantity input[type="text"] {
    width: 34px;
    font-size: 12px;
}

.modal-shopping-cart .tf-mini-cart-remove {
    font-size: 11px;
}

.modern-categories .tf-shopall .icon,
.modern-categories .tf-shopall .icon-arrow1-top-left {
    font-size: 16px;
}

.modern-categories .tf-shopall .collection-image {
    width: 62px;
    height: 62px;
}

/* Cart modal brand icons - small 4 per row */
.modal-shopping-cart .tf-minicart-brands-grid .collection-item-circle {
    min-width: auto;
}

.modal-shopping-cart .tf-minicart-brands-grid .collection-item-circle .has-saleoff-wrap,
.modal-shopping-cart .tf-minicart-brands-grid .collection-item-circle .collection-image {
    width: 48px;
    height: 48px;
}

.modal-shopping-cart .tf-minicart-brands-grid .collection-item-circle img {
    max-width: 48px;
    max-height: 48px;
    border-radius: 50%;
}

.modal-shopping-cart .tf-minicart-brands-grid .collection-content {
    margin-top: 6px !important;
}

.modal-shopping-cart .tf-minicart-brands-grid .collection-content a {
    font-size: 10px !important;
    line-height: 12px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ===================================================
   GLOBAL PRODUCT CARD IMAGE FIX
   Applied to all pages via custom-layout.css
   =================================================== */

/* Consistent aspect-ratio box so images never stretch cards */
.card-product-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: #f5f5f5;
    width: 100%;
    flex-shrink: 0;
}

/* product-img link fills the wrapper */
.card-product-wrapper .product-img,
.card-product-wrapper > a.product-img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Both images fill the box and cover it */
.card-product-wrapper .img-product,
.card-product-wrapper .img-hover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: opacity 0.4s ease, transform 0.5s ease;
}

/* Hover image sits on top, hidden by default */
.card-product-wrapper .img-hover {
    position: absolute;
    inset: 0;
    opacity: 0;
}

/* Hover effects */
.card-product:hover .card-product-wrapper .img-product {
    transform: scale(1.05);
}

.card-product:hover .card-product-wrapper .img-hover {
    opacity: 1;
}

/* Card body fills remaining height */
.card-product {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-product-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Title 2-line clamp */
.card-product-info .title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Categories page grid: 4 on mobile, adaptive on tablets, 8 on desktop */
.categories-page-section .categories-circle-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 10px;
}

.categories-page-section .collection-item-circle {
    text-align: center;
}

.categories-page-section .collection-item-circle .collection-image {
    width: 100%;
    max-width: clamp(58px, 20vw, 108px);
    aspect-ratio: 1 / 1;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    overflow: hidden;
}

.categories-page-section .collection-item-circle .collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (min-width: 768px) {
    .categories-page-section .categories-circle-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 20px 14px;
    }

    .categories-page-section .collection-item-circle .collection-image {
        max-width: clamp(76px, 13vw, 122px);
    }
}

@media (min-width: 992px) {
    .categories-page-section .categories-circle-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .categories-page-section .categories-circle-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
        gap: 24px 16px;
    }

    .categories-page-section .collection-item-circle .collection-image {
        max-width: clamp(90px, 7vw, 124px);
    }
}

/* ============================================================
   PC-CARD — redesigned product card (global, all pages)
   ============================================================ */

.swiper-slide:has(.pc-card) {
    height: auto;
}

.swiper-slide .pc-card,
.pc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.pc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.pc-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #f1f5f9;
    flex: 0 0 auto;
}

.pc-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.pc-img-main,
.pc-img-hover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: opacity 0.4s ease, transform 0.45s ease;
}

.pc-img-hover {
    opacity: 0;
}

.pc-card:hover .pc-img-main {
    transform: scale(1.04);
}

.pc-card:hover .pc-img-hover {
    opacity: 1;
    transform: scale(1.04);
}

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

.pc-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pc-badge--sale { background: #ef4444; color: #fff; }
.pc-badge--new  { background: #0f766e; color: #fff; }

.pc-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.pc-card:hover .pc-actions {
    transform: translateY(0);
}

.pc-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    flex-shrink: 0;
}

.pc-action-btn:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    transform: scale(1.08);
}

.pc-action-btn .icon {
    font-size: 15px;
    line-height: 1;
}

.pc-action-btn--cart {
    flex: 1;
    width: auto;
    border-radius: 10px;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.pc-action-btn--cart:hover {
    background: #0f766e;
    border-color: #0f766e;
    transform: none;
}

.pc-action-label { white-space: nowrap; }

.pc-action-btn.wishlist.active {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

.pc-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px 14px;
    flex: 1 1 auto;
}

.pc-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #0f766e;
    text-decoration: none;
    line-height: 1;
}

.pc-category:hover { color: #0d5c55; }

.pc-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.pc-title:hover { color: #0f766e; }

.pc-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.pc-stars {
    display: flex;
    align-items: center;
    gap: 1px;
}

.pc-star { width: 12px; height: 12px; }
.pc-star--full  { fill: #f59e0b; color: #f59e0b; }
.pc-star--half  { fill: #f59e0b; color: #e2e8f0; }
.pc-star--empty { fill: #e2e8f0; color: #e2e8f0; }

.pc-rating-count {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1;
}

.pc-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
}

.pc-price-regular,
.pc-price-sale {
    font-size: 16px;
    font-weight: 800;
    color: #0f766e;
    letter-spacing: -0.3px;
}

.pc-price-sale     { color: #dc2626; }
.pc-price-original { font-size: 13px; font-weight: 400; color: #94a3b8; text-decoration: line-through; }

.pc-card--skeleton .pc-image-wrap,
.pc-card--skeleton .pc-info > * {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: pc-shimmer 1.4s infinite;
}

.pc-card--skeleton .pc-info > * {
    border-radius: 6px;
    color: transparent;
    pointer-events: none;
}

@keyframes pc-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 575px) {
    .pc-info { padding: 10px 10px 12px; }
    .pc-action-label { display: none; }
    .pc-action-btn--cart { flex: 0 0 36px; border-radius: 50%; }
}
