/* =====================================================
   Section 2 — Featured Products Carousel
   Card styles = exact copy of shop.css .product-card rules,
   re-scoped under .hcar-section instead of .shop-page-wrapper
   ===================================================== */

/* ── Section shell ── */
.hcar-section {
    background: var(--color-blush);
    padding: clamp(48px, 7vw, 80px) clamp(16px, 4vw, 40px);
}

.hcar-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Header row ── */
.hcar-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.hcar-header__left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hcar-pill {
    display: inline-flex;
    align-items: center;
    background: #e8f5d6;
    color: #5a8f2a;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 999px;
    width: fit-content;
}

.hcar-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    line-height: 1.15;
}

.hcar-viewall {
    font-size: 13.5px;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
    white-space: nowrap;
    margin-bottom: 4px;
}
.hcar-viewall:hover { border-color: var(--color-primary); }

/* ── Carousel track ── */
.hcar-wrapper { overflow: hidden; }

.hcar-track {
    display: flex;
    gap: 16px;
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    align-items: stretch;
}

/*
 * Each slide: 4 full cards + half of 5th visible.
 * Formula: 4.5 cards + 4 gaps = 100% wrapper
 * → width = calc((100% - 4 * 16px) / 4.5)
 */
.hcar-item {
    flex-shrink: 0;
    width: calc((100% - 4 * 16px) / 4.5);
    min-width: 0;
    display: flex;
}

.hcar-item .product-card {
    width: 100%;
}

/* ── Navigation ── */
.hcar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 22px;
}

.hcar-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid var(--color-border);
    font-size: 16px;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    padding: 0;
    flex-shrink: 0;
}
.hcar-arrow:hover:not(:disabled) {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}
.hcar-arrow:disabled { opacity: 0.3; cursor: default; }

.hcar-dots { display: flex; align-items: center; gap: 7px; }

.hcar-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.28s ease;
}
.hcar-dot.is-active {
    background: var(--color-primary);
    width: 22px;
    border-radius: 999px;
}

/* =====================================================
   Product Card — scoped to homepage carousel & grid
   Exact same rules as shop.css .shop-page-wrapper .product-card
   ===================================================== */

.hcar-section .product-card,
.hgrid-section .product-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.hcar-section .product-card:hover,
.hgrid-section .product-card:hover {
    border-color: rgba(127, 187, 66, 0.42);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* Media */
.hcar-section .product-card-media,
.hgrid-section .product-card-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--color-blush);
}

.hcar-section .product-card-image-wrap,
.hgrid-section .product-card-image-wrap {
    display: block;
    width: 100%;
    height: 100%;
}

.hcar-section .product-card-img,
.hcar-section .product-card-image-wrap img,
.hgrid-section .product-card-img,
.hgrid-section .product-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.hcar-section .product-card:hover .product-card-img,
.hcar-section .product-card:hover .product-card-image-wrap img,
.hgrid-section .product-card:hover .product-card-img,
.hgrid-section .product-card:hover .product-card-image-wrap img {
    transform: scale(1.055);
}

/* Badge */
.hcar-section .product-badge,
.hgrid-section .product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

/* Wishlist button */
.hcar-section .product-wishlist-btn,
.hgrid-section .product-wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(232, 221, 208, 0.86);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}
.hcar-section .product-wishlist-btn:hover,
.hgrid-section .product-wishlist-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.04);
}

/* Card body */
.hcar-section .product-card-body,
.hgrid-section .product-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

/* Category */
.hcar-section .product-card-category,
.hgrid-section .product-card-category {
    display: -webkit-box;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}
.hcar-section .product-card-category a,
.hgrid-section .product-card-category a { color: inherit; }
.hcar-section .product-card-category a:hover,
.hgrid-section .product-card-category a:hover { color: var(--color-primary); }

/* Title */
.hcar-section .product-card-title,
.hgrid-section .product-card-title {
    display: -webkit-box;
    min-height: 42px;
    margin: 0;
    overflow: hidden;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.hcar-section .product-card-title a,
.hgrid-section .product-card-title a { color: inherit; }
.hcar-section .product-card-title a:hover,
.hgrid-section .product-card-title a:hover { color: var(--color-primary); }

/* Price */
.hcar-section .product-card-price,
.hgrid-section .product-card-price {
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25;
}
.hcar-section .product-card-price .woocommerce-Price-amount,
.hgrid-section .product-card-price .woocommerce-Price-amount { color: var(--color-primary); }
.hcar-section .product-card-price del,
.hgrid-section .product-card-price del {
    margin-right: 5px;
    color: var(--color-muted);
    font-size: 0.84rem;
    font-weight: 600;
}
.hcar-section .product-card-price del .woocommerce-Price-amount,
.hgrid-section .product-card-price del .woocommerce-Price-amount { color: var(--color-muted); }
.hcar-section .product-card-price ins,
.hgrid-section .product-card-price ins { text-decoration: none; }

/* Rating */
.hcar-section .product-rating,
.hgrid-section .product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 18px;
}
.hcar-section .star-rating,
.hgrid-section .star-rating {
    color: #e8a634;
    font-size: 0.83rem;
    letter-spacing: 0;
}
.hcar-section .product-rating-count,
.hgrid-section .product-rating-count {
    color: var(--color-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

/* ATC Button */
.hcar-section .product-card .btn,
.hgrid-section .product-card .btn {
    margin-top: auto;
    min-height: 42px;
    border-radius: var(--radius-pill);
    font-size: 0.86rem;
}
.hcar-section .product-card .btn.loading,
.hgrid-section .product-card .btn.loading { opacity: 0.74; pointer-events: none; }
.hcar-section .product-card .btn.added,
.hgrid-section .product-card .btn.added { background: var(--color-primary-dark); }
.hcar-section .product-select-options.is-disabled,
.hgrid-section .product-select-options.is-disabled { opacity: 0.58; pointer-events: none; }

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 1024px) {
    .hcar-item { width: 200px; }
}

@media (max-width: 640px) {
    .hcar-section { padding: 40px 0; }
    .hcar-inner   { padding: 0 16px; }
    /* Native scroll on mobile */
    .hcar-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 -16px;
        padding: 4px 16px 8px;
    }
    .hcar-wrapper::-webkit-scrollbar { display: none; }
    .hcar-track { transition: none; gap: 12px; }
    /* Mobile: show 1.5 cards to hint at scrollability */
    .hcar-item  { width: calc((100% - 12px) / 1.5); }
    .hcar-nav   { display: none; }
}
