/* ==========================================================
   Daily Product Carousel — Frontend Styles
   ========================================================== */

/* ── CSS Variables (overridden per-carousel via inline style) */
.dpc-carousel-section {
    --dpc-primary:      #0a6e3f;
    --dpc-accent:       #e74c3c;
    --dpc-radius:       12px;
    --dpc-shadow:       0 2px 16px rgba(0, 0, 0, .08);
    --dpc-shadow-hover: 0 8px 32px rgba(0, 0, 0, .16);
    --dpc-card-bg:      #ffffff;
    --dpc-text:         #1a1a2e;
    --dpc-muted:        #6b7280;
    --dpc-border:       #f0f0f0;
    --dpc-transition:   0.25s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    padding: 2rem 0 2.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Header ────────────────────────────────────────────────── */
.dpc-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 4px;
}

.dpc-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--dpc-text);
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.dpc-title-icon { font-size: 1.2em; }

/* ── Countdown Timer ────────────────────────────────────────── */
.dpc-countdown {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--dpc-accent);
    color: #fff;
    padding: .4rem 1rem;
    border-radius: 100px;
    font-size: .82rem;
    font-weight: 600;
}
.dpc-countdown-label { opacity: .85; }
.dpc-countdown-timer {
    display: flex;
    align-items: center;
    gap: .25rem;
}
.dpc-time {
    background: rgba(0,0,0,.2);
    border-radius: 4px;
    padding: .1rem .35rem;
    min-width: 26px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.dpc-sep { opacity: .7; }

/* ── Swiper wrapper ────────────────────────────────────────── */
.dpc-swiper-wrap {
    position: relative;
    padding: 0 4px 2rem;
}
.dpc-swiper { overflow: hidden; }
.dpc-swiper .swiper-wrapper { align-items: stretch; }
.dpc-swiper .swiper-slide { height: auto; }

/* ── Nav Arrows ─────────────────────────────────────────────── */
.dpc-nav {
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% - 1rem));
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--dpc-border);
    background: #fff;
    color: var(--dpc-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--dpc-shadow);
    transition: all var(--dpc-transition);
}
.dpc-nav:hover {
    background: var(--dpc-primary);
    border-color: var(--dpc-primary);
    color: #fff;
    box-shadow: var(--dpc-shadow-hover);
}
.dpc-prev { left: -20px; }
.dpc-next { right: -20px; }

@media (max-width: 640px) {
    .dpc-prev { left: -10px; }
    .dpc-next { right: -10px; }
    .dpc-nav  { width: 34px; height: 34px; }
}

/* ── Pagination ─────────────────────────────────────────────── */
.dpc-swiper-wrap .swiper-pagination {
    bottom: 0;
}
.dpc-swiper-wrap .swiper-pagination-bullet {
    background: var(--dpc-primary);
    opacity: .3;
    width: 6px;
    height: 6px;
    transition: all var(--dpc-transition);
}
.dpc-swiper-wrap .swiper-pagination-bullet-active {
    opacity: 1;
    width: 20px;
    border-radius: 3px;
}

/* ── Product Card ────────────────────────────────────────────── */
.dpc-card {
    background: var(--dpc-card-bg);
    border-radius: var(--dpc-radius);
    box-shadow: var(--dpc-shadow);
    border: 1px solid var(--dpc-border);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform var(--dpc-transition), box-shadow var(--dpc-transition);
}
.dpc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--dpc-shadow-hover);
}

/* Image */
.dpc-card__image-link { display: block; overflow: hidden; }
.dpc-card__image-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f9fa;
}
.dpc-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}
.dpc-card:hover .dpc-card__image { transform: scale(1.06); }

/* Labels */
.dpc-label {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .25rem .6rem;
    border-radius: 100px;
    z-index: 2;
    pointer-events: none;
}
.dpc-label--hot     { background: #ff4500; color: #fff; }
.dpc-label--new     { background: #7c3aed; color: #fff; }
.dpc-label--sale    { background: var(--dpc-primary); color: #fff; }
.dpc-label--limited { background: #f59e0b; color: #fff; }

/* Discount badge */
.dpc-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--dpc-accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .25rem .55rem;
    border-radius: 6px;
    z-index: 2;
    pointer-events: none;
}

/* Body */
.dpc-card__body {
    padding: .85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    flex: 1;
}
.dpc-card__title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--dpc-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    transition: color var(--dpc-transition);
}
.dpc-card__title:hover { color: var(--dpc-primary); }

/* WooCommerce price overrides */
.dpc-card__price { font-size: .92rem; font-weight: 700; margin-top: auto; }
.dpc-card__price .woocommerce-Price-amount { color: var(--dpc-primary); }
.dpc-card__price del .woocommerce-Price-amount {
    color: var(--dpc-muted);
    font-size: .8rem;
    font-weight: 400;
}
.dpc-card__price ins { text-decoration: none; }

/* Add to cart button */
.dpc-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    padding: .6rem .75rem;
    font-size: .82rem;
    font-weight: 600;
    border-radius: calc(var(--dpc-radius) - 4px);
    border: none;
    cursor: pointer;
    background: var(--dpc-primary);
    color: #fff;
    text-decoration: none;
    transition: all var(--dpc-transition);
    margin-top: auto;
    letter-spacing: .02em;
}
.dpc-card__btn:hover { filter: brightness(1.12); transform: translateY(-1px); color: #fff; }
.dpc-card__btn:active { transform: translateY(0); }
.dpc-card__btn--view { background: transparent; border: 1.5px solid var(--dpc-primary); color: var(--dpc-primary); }
.dpc-card__btn--view:hover { background: var(--dpc-primary); color: #fff; }
.dpc-card__btn.loading { opacity: .65; pointer-events: none; }
.dpc-card__btn.added   { background: #16a34a; }

/* ── No products ─────────────────────────────────────────────── */
.dpc-no-products {
    color: var(--dpc-muted);
    font-size: .9rem;
    padding: 1rem;
    text-align: center;
}
