/* ============================================================
   HOME PAGE — DEDICATED STYLESHEET
   All homepage-specific styles. Shared styles stay in style.css.
============================================================ */

/* ── 5-column grid for AI recommendations ── */
.col-xl-hp5 {
    flex: 0 0 auto;
    width: 20%;
}
@media (max-width: 1199.98px) { .col-xl-hp5 { width: 33.333%; } }
@media (max-width: 767.98px)  { .col-xl-hp5 { width: 50%; } }
@media (max-width: 479.98px)  { .col-xl-hp5 { width: 100%; } }

/* ============================================================
   HERO
============================================================ */
.hp-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #3730a3 100%);
    padding: 56px 0 48px;
    position: relative;
    overflow: hidden;
}

.hp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 10% 60%, rgba(129,140,248,0.22) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 30%, rgba(167,139,250,0.18) 0%, transparent 50%);
    pointer-events: none;
}

/* Animated accent line */
.hp-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #667eea);
    background-size: 200% 100%;
    animation: ph-accent 5s linear infinite;
}

.hp-hero-row { min-height: 52vh; padding: 1rem 0; }

.hp-hero-copy { position: relative; z-index: 2; }

.hp-hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 0.375rem 1rem;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    margin-bottom: 1.25rem;
}

.hp-hero-heading {
    font-size: 2.875rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.hp-hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.65;
    max-width: 480px;
    margin-bottom: 1.75rem;
}

.hp-hero-btns {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.hp-btn-primary {
    background: #fff;
    color: #667eea;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    transition: all 0.22s ease;
    text-decoration: none;
}
.hp-btn-primary:hover {
    background: #f0f2ff;
    color: #5b6af0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.hp-btn-outline {
    background: transparent;
    color: #fff;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1.5px solid rgba(255,255,255,0.45);
    transition: all 0.22s ease;
    text-decoration: none;
}
.hp-btn-outline:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.8);
    transform: translateY(-2px);
}

.hp-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.hp-trust-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}
.hp-trust-item i { color: #ffd700; font-size: 0.9rem; }

/* Hero visual */
.hp-hero-visual {
    position: relative;
    z-index: 2;
    align-items: center;
    justify-content: center;
}

.hp-visual-grid {
    position: relative;
    width: 400px;
    height: 360px;
    margin: 0 auto;
}

@keyframes hp-float {
    0%,100% { transform: translate(-50%,-50%) translateY(0); }
    50%      { transform: translate(-50%,-50%) translateY(-14px); }
}

.hp-visual-center {
    width: 190px;
    height: 190px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    border: 3px solid rgba(255,255,255,0.3);
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    animation: hp-float 3.5s ease-in-out infinite;
}
.hp-visual-center i { font-size: 5.5rem; color: #fff; }

.hp-float-card {
    position: absolute;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 9px 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 125px;
}
.hp-fc-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg,rgba(102,126,234,0.12),rgba(118,75,162,0.12));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: #667eea; flex-shrink: 0;
}
.hp-fc-text { display: flex; flex-direction: column; line-height: 1.2; }
.hp-fc-text strong { font-size: 0.85rem; font-weight: 700; color: #2d3561; }
.hp-fc-text span   { font-size: 0.7rem; color: #6c757d; }

.hp-fc--tl { top: 12px;  left: 0;   animation: hp-float 3s   ease-in-out infinite; }
.hp-fc--tr { top: 12px;  right: 0;  animation: hp-float 3.8s ease-in-out infinite 0.5s; }
.hp-fc--bl { bottom: 12px; left: 0; animation: hp-float 3.2s ease-in-out infinite 1s; }
.hp-fc--br { bottom: 12px; right: 0;animation: hp-float 4s   ease-in-out infinite 1.5s; }

/* ============================================================
   STATS BAR
============================================================ */
.hp-stats-bar {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1.125rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.hp-stats-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.hp-stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 2rem;
}
.hp-stat-item i { font-size: 1.4rem; color: #667eea; }
.hp-stat-item div { display: flex; flex-direction: column; line-height: 1.2; }
.hp-stat-item strong { font-size: 0.9375rem; font-weight: 700; color: #2d3561; }
.hp-stat-item span   { font-size: 0.72rem; color: #6c757d; }

.hp-stat-divider { width: 1px; height: 34px; background: #e9ecef; flex-shrink: 0; }

/* ============================================================
   SHARED SECTION WRAPPER
============================================================ */
.hp-section {
    padding: 2.75rem 0;
    background: #fff;
}

.hp-section--alt {
    background: #f8f9fa;
}

.hp-section-head {
    margin-bottom: 1.75rem;
}

.hp-section-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: #2d3561;
    margin-bottom: 0.375rem;
}

.hp-section-sub {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

/* ============================================================
   SKELETON LOADER
============================================================ */
@keyframes hp-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

.hp-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 600px 100%;
    animation: hp-shimmer 1.4s ease-in-out infinite;
    border-radius: 10px;
    min-height: 160px;
}

/* ============================================================
   CATEGORY CARDS
============================================================ */
.hp-cat-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    height: 100%;
}
.hp-cat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(102,126,234,0.14);
    border-color: rgba(102,126,234,0.3);
}

.hp-cat-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    transition: transform 0.22s ease;
}
.hp-cat-card:hover .hp-cat-icon { transform: scale(1.08); }
.hp-cat-icon i { font-size: 1.875rem; color: #fff; }

.hp-cat-name  { font-size: 1rem; font-weight: 600; color: #2d3561; margin-bottom: 0.25rem; }
.hp-cat-count { font-size: 0.8125rem; color: #6c757d; margin: 0; }

/* ============================================================
   PRODUCT CARDS
============================================================ */
.hp-prod-card {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.hp-prod-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.09);
    border-color: #c5cae9;
}

.hp-prod-card--ai {
    border-color: #667eea;
    padding-top: 0.5rem;
    position: relative;
}
.hp-prod-card--ai:hover {
    box-shadow: 0 12px 28px rgba(102,126,234,0.18);
}

.hp-ai-label {
    position: absolute;
    top: -1px; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 3px 14px;
    border-radius: 0 0 8px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    z-index: 2;
    white-space: nowrap;
}

.hp-prod-img-wrap {
    height: 170px;
    background: #f7f8fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.hp-prod-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.hp-prod-card:hover .hp-prod-img { transform: scale(1.05); }
.hp-prod-placeholder-icon { font-size: 2.75rem; color: #c8cdd5; }

.hp-prod-body {
    padding: 0.875rem 0.875rem 0.875rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hp-prod-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1d23;
    margin-bottom: 0.375rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-prod-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 0.375rem;
}
.hp-prod-stars i   { font-size: 0.7rem; color: #f5a623; }
.hp-prod-stars span{ font-size: 0.7rem; color: #9aa0ac; margin-left: 3px; }

.hp-prod-price {
    font-size: 1rem;
    font-weight: 700;
    color: #5b6af0;
    margin-bottom: 0.625rem;
    margin-top: auto;
}

.hp-prod-btn {
    width: 100%;
    background: #5b6af0;
    color: #fff;
    border: none;
    padding: 0.5rem;
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: background 0.18s ease;
}
.hp-prod-btn:hover { background: #4a58e0; color: #fff; }

/* View All button */
.hp-btn-outline-dark {
    background: transparent;
    color: #5b6af0;
    border: 1.5px solid #5b6af0;
    padding: 0.65rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.22s ease;
    text-decoration: none;
}
.hp-btn-outline-dark:hover {
    background: #5b6af0;
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================================
   FEATURE CARDS (Why Choose Us)
============================================================ */
.hp-feature-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.625rem 1.25rem;
    text-align: center;
    height: 100%;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.hp-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.07);
}

.hp-feature-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.hp-feature-icon i { font-size: 1.625rem; color: #667eea; }

.hp-feature-title { font-size: 0.9375rem; font-weight: 700; color: #2d3561; margin-bottom: 0.5rem; }
.hp-feature-desc  { font-size: 0.85rem; color: #6c757d; line-height: 1.6; margin: 0; }

/* ============================================================
   AI BADGE
============================================================ */
.hp-ai-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    color: #667eea;
    padding: 0.3rem 0.875rem;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid rgba(102,126,234,0.2);
    margin-bottom: 0.625rem;
}

/* ============================================================
   REVIEW CARDS
============================================================ */
.hp-review-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.hp-review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.07);
}

.hp-review-stars { display: flex; gap: 3px; margin-bottom: 0.875rem; }
.hp-review-stars i { font-size: 0.9rem; color: #ffc107; }

.hp-review-text {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    font-style: italic;
}

.hp-review-author { display: flex; align-items: center; gap: 0.875rem; }

.hp-review-avatar {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.hp-review-avatar i { font-size: 1.875rem; color: #667eea; }

.hp-review-name { font-size: 0.9rem; font-weight: 700; color: #2d3561; display: block; }
.hp-review-role { font-size: 0.775rem; color: #6c757d; }

/* ── Last section before CTA: reduced bottom padding for breathing room ── */
.hp-section:has(+ .hp-cta),
.hp-section--last {
    padding-bottom: 2.5rem;
}

/* ============================================================
   CTA SECTION
============================================================ */
.hp-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}
.hp-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.12) 0%, transparent 65%);
    pointer-events: none;
}

.hp-cta-inner { position: relative; z-index: 2; }

.hp-cta-heading {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.625rem;
    letter-spacing: -0.5px;
}

.hp-cta-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.88);
    margin-bottom: 1.75rem;
}

.hp-cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hp-btn-cta-primary {
    background: #fff;
    color: #667eea;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9375rem;
    border: none;
    transition: all 0.22s ease;
    text-decoration: none;
}
.hp-btn-cta-primary:hover {
    background: #f0f2ff;
    color: #5b6af0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.hp-btn-cta-outline {
    background: transparent;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9375rem;
    border: 1.5px solid rgba(255,255,255,0.5);
    transition: all 0.22s ease;
    text-decoration: none;
}
.hp-btn-cta-outline:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.85);
    transform: translateY(-2px);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 991.98px) {
    .hp-hero-heading { font-size: 2.25rem; }
    .hp-hero-row { min-height: auto; }
    .hp-stat-item { padding: 0.5rem 1.25rem; }
}

@media (max-width: 767.98px) {
    .hp-hero { padding: 40px 0 36px; }
    .hp-hero-heading { font-size: 1.875rem; }
    .hp-section { padding: 2.25rem 0; }
    .hp-section-title { font-size: 1.375rem; }
    .hp-cta-heading { font-size: 1.625rem; }
    .hp-stat-divider { display: none; }
    .hp-stats-inner { gap: 0.5rem; }
    .hp-stat-item { padding: 0.5rem 0.875rem; }
}

@media (max-width: 575.98px) {
    .hp-hero-btns { flex-direction: column; }
    .hp-hero-btns .btn { width: 100%; text-align: center; }
    .hp-trust-row { gap: 0.5rem 1rem; }
    .hp-cta-btns { flex-direction: column; align-items: center; }
    .hp-btn-cta-primary,
    .hp-btn-cta-outline { width: 100%; max-width: 280px; text-align: center; }
}

/* ============================================================
   AI RECOMMENDATIONS CAROUSEL
   Mirrors the rec-section on products.php exactly.
   rec-* classes are defined in products.css; these rules
   make them available on the homepage without loading that file.
============================================================ */

/* Outer: positions the arrows */
.rec-outer {
    position: relative;
    padding: 0 20px;
    margin: 0 -20px;
}

/* Side arrows */
.rec-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 60px;
    background: rgba(255,255,255,0.95);
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0f1111;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.rec-arrow:hover { background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.18); }
.rec-arrow:disabled { opacity: 0; pointer-events: none; }
.rec-arrow--left  { left: -18px; }
.rec-arrow--right { right: -18px; }

/* Viewport clips the track */
.rec-viewport { overflow: hidden; width: 100%; }

/* Track */
.rec-track {
    display: flex;
    gap: 0;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Card */
.rec-card {
    flex: 0 0 calc(100% / 6);
    min-width: 0;
    background: #fff;
    border-right: 1px solid #e7e7e7;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    padding: 14px 12px 16px;
    transition: background 0.15s ease;
    box-sizing: border-box;
}
.rec-card:last-child { border-right: none; }
.rec-card:hover { background: #f7f8ff; }

/* Image */
.rec-card-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
}
.rec-card-img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}
.rec-card:hover .rec-card-img { transform: scale(1.05); }
.rec-card-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #ccc; font-size: 2.5rem; background: #f8f9fa;
}

/* Body */
.rec-card-body { display: flex; flex-direction: column; flex: 1; }
.rec-card-name {
    font-size: 13px;
    font-weight: 400;
    color: #0f1111;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    min-height: 54px;
}
.rec-card:hover .rec-card-name { color: #5b6af0; }
.rec-card-rating {
    display: flex; align-items: center; gap: 2px;
    margin-bottom: 5px; flex-wrap: wrap;
}
.rec-card-rating i { font-size: 11px; color: #f59e0b; }
.rec-card-rating-count { font-size: 11px; color: #5b6af0; margin-left: 3px; }
.rec-card-price {
    font-size: 15px; font-weight: 700;
    color: #0f1111; line-height: 1.2; margin-bottom: 2px;
}

/* Responsive */
@media (max-width: 991.98px) { .rec-card { flex: 0 0 calc(100% / 3); } }
@media (max-width: 575.98px) {
    .rec-card { flex: 0 0 calc(100% / 2); }
    .rec-card-name { min-height: auto; -webkit-line-clamp: 2; }
    .rec-arrow--left  { left: -12px; }
    .rec-arrow--right { right: -12px; }
}
