/* ==========================================================================
   Product Card — modern retail layout
   ========================================================================== */

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #ececec;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
    border-color: #e0e0e0;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.product-card .product-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* --------------------------------------------------------------------------
   Media
   -------------------------------------------------------------------------- */

.product-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.product-card__media-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.product-card__image,
.product-card .card-img-top,
.product-card .card-img-category {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    padding: 26px;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.04);
}

.product-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    z-index: 2;
}

.product-card--out-of-stock .product-card__image {
    opacity: 0.6;
    filter: grayscale(0.3);
}

/* --------------------------------------------------------------------------
   Badges & overlays
   -------------------------------------------------------------------------- */

.product-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-width: calc(100% - 60px);
}

.product-card__badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.product-card__badge--danger,
.product-card__badge.danger {
    background-color: #ff5b5c;
}

.product-card__badge--black-color,
.product-card__badge.black-color {
    background-color: #191919;
}

.product-card__badge.success {
    background-color: #39da8a;
}

.product-card__badge.warning {
    background-color: #fdac41;
}

.product-card__badge.default {
    background-color: #5a8dee;
}

.product-card__badge.info {
    background-color: #00cfdd;
}

.product-card__badge.black-color {
    background-color: #191919;
}

.product-card__badge.orange-color {
    background-color: #ff6a00;
}

.product-card__badge--success {
    background-color: #39da8a;
}

.product-card__badge--warning {
    background-color: #fdac41;
}

.product-card__badge--default {
    background-color: #5a8dee;
}

.product-card__badge--info {
    background-color: #00cfdd;
}

.product-card__badge--orange-color {
    background-color: #ff6a00;
}

.product-card .favorite-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    color: #e50046;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card .favorite-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.product-card span.q-product-in-cart {
    position: absolute;
    top: 10px;
    right: 52px;
    z-index: 1;
    font-size: 12px;
    font-weight: 700;
    color: #191919;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-primary, #febb16);
    box-shadow: 0 2px 8px rgba(254, 187, 22, 0.5);
}

.product-card__original-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 1;
}

.product-card .product-card-right-label {
    width: 80px !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

.product-card__timer {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    z-index: 4;
    text-align: center;
}

.product-card__timer-inner {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.product-card .day-container,
.product-card .hours,
.product-card .minutes,
.product-card .seconds {
    min-width: 2.2rem;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1.3;
    background-color: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-weight: 700;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Content
   -------------------------------------------------------------------------- */

.product-card__content {
    padding: 12px 14px 8px;
    flex: 1;
}

.product-card__title-link {
    text-decoration: none;
}

.product-card .card-text,
.product-card__title {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.6rem;
    height: auto !important;
    margin-bottom: 0;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
    color: #333;
    transition: color 0.2s ease;
}

.product-card:hover .product-card__title {
    color: #f36f11;
}

.product-card .item-icons {
    margin: 10px 0 4px;
    justify-content: flex-start;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.product-card__footer {
    margin-top: auto;
    padding: 0 14px 14px;
    text-align: center;
}

.product-card__footer .item-icons {
    margin: 8px 0;
    justify-content: center;
}

.product-card__pricing {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    min-height: 1.75rem;
    margin-bottom: 4px;
}

.product-card .old_price {
    text-decoration: line-through;
    color: #b4b4b4;
    font-size: 0.88rem;
    font-weight: 500;
}

.product-card .new_price {
    color: #191919;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.product-card__sale-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 4px;
    background: #e50046;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Cart bar
   -------------------------------------------------------------------------- */

.product-card__cart {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.product-card__cart-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.product-card__cart-row .product-card__qty,
.product-card__cart-row .pro-qty {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    height: 42px;
    margin: 0;
    padding: 0 6px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fafafa;
    float: none;
}
.product-card__cart-row .pro-qty input {
    float: none;
}

.product-card__cart-row .pro-qty .qtybtn {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    line-height: 24px;
    font-size: 15px;
    font-weight: 500;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.product-card__cart-row .pro-qty .qtybtn:hover {
    border-color: var(--color-primary, #febb16);
    background: #fffbeb;
}

.product-card__cart-row .pro-qty input {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 28px;
    margin: 0 6px;
    padding: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 28px;
    color: #191919;
}

.product-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card__cta i {
    font-size: 1rem;
    line-height: 1;
}

.product-card__cta.btn-warning {
    background-color: var(--color-primary, #febb16);
    border-color: var(--color-primary, #febb16);
    color: #191919;
}

.product-card__cta.btn-warning:hover:not(:disabled),
.product-card__cta.btn-warning:focus:not(:disabled) {
    background-color: #f0ad00;
    border-color: #f0ad00;
    color: #191919;
    box-shadow: 0 4px 14px rgba(254, 187, 22, 0.3);
    transform: none;
}

.product-card__cta.btn-primary.update-cart {
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 10px 12px;
}

.product-card__cta--mail {
    width: 100%;
    margin-top: 0;
}

.product-card__cta-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card__cart--unavailable {
    display: flex;
    flex-direction: column;
}

.product-card .mail-me-btn {
    margin: 0;
    font-size: 0.8rem;
    padding: 10px 12px;
}

/* --------------------------------------------------------------------------
   Home carousel — keep uniform slide height (matches pre-redesign slider)
   -------------------------------------------------------------------------- */

.owl-carousel-products .owl-item {
    display: flex;
    align-items: stretch;
}

.owl-carousel-products .owl-item > .product-card,
.owl-carousel-products .owl-item > .category-see-more-card {
    width: 100%;
}

.owl-carousel-products .product-card {
    min-height: 468px;
    height: 100%;
}

.owl-carousel-products .product-card:hover {
    transform: none;
}

.owl-carousel-products .product-card:hover .product-card__image {
    transform: none;
}

.owl-carousel-products .product-card__media {
    aspect-ratio: auto;
    height: 220px;
    max-height: 220px;
}

.owl-carousel-products .category-see-more-card {
    height: auto;
    min-height: 468px;
}

.owl-carousel-products .category-see-more-card:hover {
    transform: none;
}

/* --------------------------------------------------------------------------
   Category carousel — "See more" slide
   -------------------------------------------------------------------------- */

.category-see-more-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #ececec;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.category-see-more-card:hover {
    border-color: #e0e0e0;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.category-see-more-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.category-see-more-card__visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    background: linear-gradient(145deg, #fffbf0 0%, #fff8e6 50%, #fff 100%);
    position: relative;
    overflow: hidden;
}

.category-see-more-card__visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(254, 187, 22, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(254, 187, 22, 0.06) 0%, transparent 45%);
}

.category-see-more-card__icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--color-primary, #febb16);
    color: #191919;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(254, 187, 22, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-see-more-card__icon i {
    transition: transform 0.3s ease;
}

.category-see-more-card:hover .category-see-more-card__icon {
    transform: scale(1.06);
    box-shadow: 0 12px 32px rgba(254, 187, 22, 0.45);
}

.category-see-more-card:hover .category-see-more-card__icon i {
    transform: translateX(3px);
}

.category-see-more-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 20px;
    border-top: 1px solid #f0f0f0;
}

.category-see-more-card__label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #42424a;
    line-height: 1.3;
}

.category-see-more-card__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #42424a;
    font-size: 0.875rem;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.category-see-more-card:hover .category-see-more-card__arrow {
    background: var(--color-primary, #febb16);
    color: #191919;
    transform: translateX(2px);
}

.owl-carousel-products .product-card .product-card__image,
.owl-carousel-products .owl-item img.product-card__image {
    margin: 0;
    padding: 12px;
    min-height: auto;
    max-height: 100%;
    object-fit: contain;
}

/* --------------------------------------------------------------------------
   Mobile & touch
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
    .product-card {
        border-radius: 10px;
        -webkit-tap-highlight-color: transparent;
    }

    .product-card:hover {
        transform: none;
        box-shadow: none;
    }

    .product-card:active {
        border-color: #e0e0e0;
    }

    .product-card:hover .product-card__image {
        transform: none;
    }

    /* Media — shorter on phones to save vertical space */
    .product-card__media {
        aspect-ratio: 4 / 3;
    }

    .product-card__image,
    .product-card .card-img-top,
    .product-card .card-img-category {
        /* padding: 10px; */
    }

    /* Touch-friendly overlays */
    .product-card .favorite-icon {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
        font-size: 1.05rem;
    }

    .product-card span.q-product-in-cart {
        top: 8px;
        right: 54px;
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .product-card__badges {
        top: 8px;
        left: 8px;
        max-width: calc(100% - 56px);
    }

    .product-card__badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .product-card .product-card-right-label {
        width: 64px !important;
    }

    .product-card__timer {
        bottom: 6px;
        left: 6px;
        right: 6px;
    }

    .product-card .day-container,
    .product-card .hours,
    .product-card .minutes,
    .product-card .seconds {
        font-size: 9px;
        min-width: 2rem;
        padding: 2px 4px;
    }

    /* Content */
    .product-card__content {
        padding: 10px 4px 6px;
    }

    .product-card .card-text,
    .product-card__title {
        font-size: 0.8125rem;
        line-height: 1.3;
        min-height: 2.1rem;
        -webkit-line-clamp: 3;
        line-clamp: 2;
    }

    .product-card__footer {
        padding: 0 10px 10px;
    }

    .product-card .new_price {
        font-size: 1rem;
    }

    .product-card .old_price {
        font-size: 0.8rem;
    }

    .product-card__footer .item-icons,
    .product-card .item-icons {
        margin: 6px 0;
        gap: 2px;
    }

    .product-card .item-icons li {
        padding: 0 4px;
    }

    .product-card .item-button {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    /* Cart — 48px touch targets */
    .product-card__cart {
        margin-top: 6px;
        padding-top: 8px;
    }

    .product-card__cart-row .product-card__qty,
    .product-card__cart-row .pro-qty {
        height: 48px;
        padding: 0 8px;
        border-radius: 10px;
    }

    .product-card__cart-row .pro-qty .qtybtn {
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        line-height: 32px;
        font-size: 18px;
        border-radius: 8px;
    }

    .product-card__cart-row .pro-qty input {
        height: 36px;
        line-height: 36px;
        font-size: 1rem;
    }

    .product-card__cta {
        min-height: 48px;
        padding: 12px 14px;
        font-size: 0.875rem;
        border-radius: 10px;
    }

    .product-card__cta:active {
        transform: scale(0.98);
    }

    .product-card .mail-me-btn {
        min-height: 48px;
        font-size: 0.875rem;
        border-radius: 10px;
    }

    /* Home carousel on mobile */
    .owl-carousel-products .product-card {
        min-height: auto;
    }

    .owl-carousel-products .product-card__media {
        height: 200px;
        max-height: 200px;
    }

    .owl-carousel-products .category-see-more-card {
        min-height: 410px;
    }

    .category-see-more-card__visual {
        min-height: 200px;
    }

    .category-see-more-card__icon {
        width: 64px;
        height: 64px;
        font-size: 1.25rem;
    }

    .category-see-more-card__body {
        padding: 14px 14px 16px;
    }

    .category-see-more-card__label {
        font-size: 0.875rem;
    }
}

/* Very small phones & 2-column search grid */
@media (max-width: 575px) {
    .list.grid-view-filter .product-card__media,
    .list.grid-view-filter.search-list .product-card__media {
        aspect-ratio: 1 / 1;
    }

    .list.grid-view-filter .product-card .card-text,
    .list.grid-view-filter .product-card__title {
        font-size: 0.75rem;
        min-height: 1.95rem;
    }

    .list.grid-view-filter .product-card .new_price {
        font-size: 0.9375rem;
    }

    .list.grid-view-filter .product-card__footer .item-icons {
        margin: 4px 0;
    }

    .list.grid-view-filter .product-card .item-button {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .list.grid-view-filter .product-card__cta-label {
        font-size: 0.8125rem;
    }

    .list.grid-view-filter .product-card__cta {
        min-height: 44px;
        padding: 10px 8px;
        gap: 6px;
    }

    .list.grid-view-filter .product-card__cart-row .pro-qty .qtybtn {
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
        line-height: 28px;
        font-size: 16px;
    }

    .list.grid-view-filter .product-card__cart-row .product-card__qty,
    .list.grid-view-filter .product-card__cart-row .pro-qty {
        height: 44px;
    }
}

/* Single-column full width on smallest screens */
@media (max-width: 380px) {
    .list.grid-view-filter.search-list > li {
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .list.grid-view-filter.search-list .product-card__media {
        aspect-ratio: 4 / 3;
    }

    .list.grid-view-filter.search-list .product-card .card-text,
    .list.grid-view-filter.search-list .product-card__title {
        font-size: 0.75rem;
    }
}
