/**
 * Holy Care's - Custom CSS
 * Additional styles and animations beyond main style.css
 */

/* ============================================
   BANNER CAROUSEL
   ============================================ */
.banner-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--color-black);
}

.banner-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.banner-slide {
    position: relative;
    min-width: 100%;
    flex-shrink: 0;
    /* Mobile: 55vw height, capped */
    height: 55vw;
    min-height: 220px;
    max-height: 280px;
}

@media (min-width: 640px) {
    .banner-slide {
        height: 40vw;
        min-height: 260px;
        max-height: 360px;
    }
}

@media (min-width: 1024px) {
    .banner-slide {
        height: 32vw;
        min-height: 320px;
        max-height: 420px;
    }
}

/* Background layer */
.banner-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.banner-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.25) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
}

/* Decorative icon for fallback slides */
.banner-bg-icon {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(4rem, 12vw, 10rem);
    opacity: 0.55;
    pointer-events: none;
    filter: none;
}

/* Content layer */
.banner-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    z-index: 1;
}

.banner-content-inner {
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem var(--container-padding);
}

@media (min-width: 768px) {
    .banner-content-inner {
        padding: 2rem 3rem;
        max-width: 65%;
    }
}

/* Alignment */
.banner-align-center {
    justify-content: center;
    text-align: center;
}

.banner-align-center .banner-content-inner {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .banner-align-center .banner-content-inner {
        max-width: 700px;
    }
}

/* Title */
.banner-title {
    color: white;
    font-size: clamp(1.25rem, 4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

/* Subtitle */
.banner-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    max-width: 500px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.banner-align-center .banner-subtitle {
    max-width: 600px;
}

/* Button */
.banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    background: white;
    color: var(--color-black);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.banner-btn-gold {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    color: var(--color-black);
}

@media (min-width: 768px) {
    .banner-btn {
        padding: 0.75rem 2rem;
        font-size: 0.95rem;
    }
}

/* Dots */
.banner-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 5;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.banner-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* Arrows */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all var(--transition-fast);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
}

.banner-carousel:hover .banner-arrow {
    opacity: 1;
}

/* Always show arrows on mobile (no hover) */
@media (max-width: 1023px) {
    .banner-arrow {
        opacity: 0.7;
        width: 32px;
        height: 32px;
    }
}

.banner-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.05);
}

.banner-arrow svg {
    width: 18px;
    height: 18px;
}

.banner-prev {
    left: 0.75rem;
}

.banner-next {
    right: 0.75rem;
}

@media (min-width: 768px) {
    .banner-arrow {
        width: 42px;
        height: 42px;
    }
    .banner-arrow svg {
        width: 22px;
        height: 22px;
    }
    .banner-prev { left: 1.5rem; }
    .banner-next { right: 1.5rem; }
}

/* Progress bar */
.banner-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 5;
}

.banner-progress-bar {
    height: 100%;
    background: var(--color-gold);
    width: 0%;
    transition: width 0.3s linear;
}

.banner-progress-bar.animating {
    transition-property: width;
    transition-timing-function: linear;
    /* duration set via JS */
    width: 100% !important;
}

/* ============================================
   GLASSMORPHISM EFFECTS
   ============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
}

/* ============================================
   SHIMMER LOADING EFFECT
   ============================================ */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   PRODUCT CARD HOVER EFFECTS (Enhanced)
   ============================================ */
.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: linear-gradient(135deg, rgba(74, 158, 63, 0.03), rgba(201, 168, 76, 0.03));
    transition: opacity var(--transition-base);
    z-index: 0;
    pointer-events: none;
}

.product-card:hover::before {
    opacity: 1;
}

/* ============================================
   PULSE DOT (for live/active indicators)
   ============================================ */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-green);
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--color-green);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.8); }
}

/* ============================================
   GRADIENT BORDERS
   ============================================ */
.gradient-border {
    position: relative;
    border: none;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--color-green), var(--color-gold));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ============================================
   ANIMATED UNDERLINE LINKS
   ============================================ */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-green);
    transition: width var(--transition-base);
}

.animated-underline:hover::after {
    width: 100%;
}

/* ============================================
   BADGE STYLES
   ============================================ */
.badge-organic {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    background: linear-gradient(135deg, rgba(74, 158, 63, 0.1), rgba(74, 158, 63, 0.05));
    border: 1px solid rgba(74, 158, 63, 0.2);
    color: var(--color-green-dark);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), rgba(201, 168, 76, 0.05));
    border: 1px solid rgba(201, 168, 76, 0.2);
    color: var(--color-gold-dark);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   PRICE STYLING (WooCommerce override)
   ============================================ */
.price del {
    color: var(--color-gray-400);
    font-size: 0.85em;
    text-decoration: line-through;
    font-weight: 400;
}

.price ins {
    text-decoration: none;
    font-weight: 700;
    color: var(--color-black);
}

.price .woocommerce-Price-currencySymbol {
    font-weight: inherit;
}

/* ============================================
   WOOCOMMERCE FORM OVERRIDES
   ============================================ */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-fast);
    width: 100%;
    background: white;
    font-family: var(--font-body);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px rgba(74, 158, 63, 0.1);
}

.woocommerce form .form-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gray-700);
    margin-bottom: 0.35rem;
    display: block;
}

.woocommerce form .form-row .required {
    color: #ef4444;
}

/* WooCommerce buttons */
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-body);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--color-green), var(--color-green-dark));
    color: white;
}

.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 158, 63, 0.4);
}

.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce a.button.alt {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    color: var(--color-black);
}

/* ============================================
   WOOCOMMERCE CART TABLE (Mobile Responsive)
   ============================================ */
@media (max-width: 767px) {
    .cart-table thead {
        display: none;
    }

    .cart-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem 0;
        border-bottom: 1px solid var(--color-gray-100);
    }

    .cart-table td {
        padding: 0.25rem 0;
        border: none;
    }

    .cart-item-info {
        width: 100%;
    }

    .cart-item-info img {
        width: 60px;
        height: 60px;
    }
}

/* ============================================
   WOOCOMMERCE CHECKOUT OVERRIDES
   ============================================ */
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3 {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

/* Payment method COD highlight */
.wc_payment_method.payment_method_cod {
    border: 2px solid var(--color-gold) !important;
    background: rgba(201, 168, 76, 0.05) !important;
    border-radius: var(--radius-md);
    padding: 1rem;
}

.wc_payment_method.payment_method_cod label {
    font-weight: 700 !important;
    color: var(--color-gold-dark);
}

/* ============================================
   ORDER RECEIVED / THANK YOU PAGE
   ============================================ */
.woocommerce-order-received .woocommerce-thankyou-order-received {
    background: rgba(74, 158, 63, 0.08);
    border: 1px solid rgba(74, 158, 63, 0.2);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-green-dark);
    margin-bottom: 2rem;
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-results-header {
    background: linear-gradient(135deg, var(--color-black), var(--color-green-dark));
    padding: 3rem 0;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.search-results-header h1 {
    color: white;
    font-size: 1.75rem;
}

.search-results-header p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

/* ============================================
   RESPONSIVE FINE-TUNING
   ============================================ */
@media (max-width: 374px) {
    /* Very small screens */
    :root {
        --container-padding: 0.75rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .product-card-info {
        padding: 0.75rem;
    }

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

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

@media (min-width: 375px) and (max-width: 639px) {
    .products-grid {
        gap: 0.75rem;
    }
}

/* iPad / Tablet specific */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-content {
        gap: 2rem;
    }

}

/* ============================================
   DARK SECTION TEXT
   ============================================ */
.dark-section {
    background: var(--color-black);
    color: white;
}

.dark-section h1,
.dark-section h2,
.dark-section h3 {
    color: white;
}

.dark-section p {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   TOOLTIP
   ============================================ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: var(--color-black);
    color: white;
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    pointer-events: none;
    z-index: 10;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-green);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    z-index: 99;
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-green-dark);
    transform: translateY(-2px);
}

@media (max-width: 1023px) {
    .back-to-top {
        display: none;
    }
}
