/* =============================================
   SUPER PISOS PANAMÁ – Home Page Styles
   ============================================= */

/* ── HERO ────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: calc(var(--header-height) + var(--space-8));
    padding-bottom: var(--space-20);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-6);
    animation: badgeReveal 0.8s ease-out 0.2s both;
}

@keyframes badgeReveal {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge::before {
    content: '★';
    color: var(--color-primary);
    font-size: var(--font-size-base);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: var(--font-weight-black);
    color: white;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    max-width: 720px;
    letter-spacing: -0.02em;
    animation: titleReveal 1s ease-out 0.4s both;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    max-width: 580px;
    margin-bottom: var(--space-10);
    line-height: 1.7;
    animation: subtitleReveal 1s ease-out 0.6s both;
}

@keyframes subtitleReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-12);
    animation: actionsReveal 1s ease-out 0.8s both;
}

@keyframes actionsReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-actions .btn {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-md);
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    padding: var(--space-6) var(--space-10);
    width: fit-content;
    animation: trustReveal 1s ease-out 1s both;
}

@keyframes trustReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
}

.hero-trust-num {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    color: var(--color-primary);
    line-height: 1;
}

.hero-trust-item span:last-child {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-trust-sep {
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 28px;
    height: 28px;
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
    animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    50% {
        transform: rotate(45deg) translateY(8px);
    }
}

@media(max-width: 900px) {
    .hero-trust {
        gap: var(--space-6);
        padding: var(--space-5) var(--space-6);
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Promo strip block removed as per index changes */

/* ── CATEGORIES GRID ─────────────────────── */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
    gap: var(--space-4);
}

.cat-main {
    grid-column: 1 / span 2 !important;
    grid-row: 1 / span 2 !important;
}

.cat-main .category-card-name {
    font-size: var(--font-size-2xl);
}

@media(max-width:900px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 220px;
    }

    .cat-main {
        grid-column: 1 / -1;
        grid-row: span 1 !important;
    }
}

@media(max-width:560px) {
    .categories-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: var(--space-5);
    }

    .cat-main {
        grid-column: 1 / -1;
        grid-row: span 1 !important;
    }

    .category-card {
        height: 220px;
        min-height: 220px;
        width: 100%;
    }

    .category-card-overlay {
        padding: var(--space-6);
    }
}

@media(max-width:640px) {
    #featuredProducts {
        gap: var(--space-5);
    }

    #featuredProducts .product-card,
    #featuredProducts .product-card-body,
    #featuredProducts .product-card-footer {
        min-width: 0;
    }

    #featuredProducts .product-card-img {
        aspect-ratio: 4 / 3;
        height: auto;
    }

    #featuredProducts .product-card-footer {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--space-3);
        align-items: stretch;
    }

    #featuredProducts .product-card .btn {
        width: 100%;
        min-width: 0;
        white-space: normal;
        line-height: 1.2;
    }
}

/* ── STATS ───────────────────────────────── */
.stats-section {
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    min-width: 0;
    width: 100%;
}

@media(max-width:768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:480px) {
    .stats-section {
        padding: var(--space-12) 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .stats-grid .stat-card {
        padding: var(--space-4) var(--space-3);
        min-width: 0;
        width: 100%;
    }

    .stats-grid .stat-number {
        font-size: clamp(2.35rem, 15vw, 3.25rem);
        letter-spacing: -0.06em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
    }

    .stats-grid .stat-label {
        font-size: 0.76rem;
        line-height: 1.35;
    }
}

@media(max-width:360px) {
    .stats-grid .stat-number {
        font-size: clamp(2rem, 14vw, 2.65rem);
    }
}

/* ── TOOLS SECTION ───────────────────────── */
.tools-section {
    background: var(--color-white);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

@media(max-width:768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

.tool-card {
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-2xl);
    padding: var(--space-12) var(--space-8);
    transition: all var(--transition-smooth);
    text-align: center;
    background: var(--color-white);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.tool-card:hover {
    border-color: var(--color-primary-200);
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card--accent {
    background: linear-gradient(180deg, var(--color-gray-50) 0%, var(--color-accent) 100%);
    border-color: var(--color-accent);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: var(--space-6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--color-primary-50);
    border-radius: var(--radius-xl);
    color: var(--color-primary);
}

/* ── TESTIMONIAL SLIDER ──────────────────── */
.testimonial-slider {
    overflow: hidden;
    border-radius: var(--radius-2xl);
    width: 100%;
}

.slider-track {
    display: flex;
    transition: transform var(--transition-slow);
    will-change: transform;
}

.slider-slide {
    flex: 0 0 100%;
    width: 100%;
    padding: var(--space-3);
    box-sizing: border-box;
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
}

.slider-nav-btn {
    width: 48px;
    height: 48px;
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    color: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slider-nav-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.slider-dots {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    width: auto;
    max-width: min(100%, 220px);
    flex-wrap: wrap;
    padding: var(--space-4) 0;
}

.slider-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    min-height: 10px;
    flex: 0 0 auto;
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
}

.slider-dot:hover {
    background: var(--color-gray-400);
}

.slider-dot:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.3);
}

.slider-dot.active {
    background: var(--color-primary);
    width: 32px;
    border-radius: 5px;
    min-width: 32px;
    min-height: 10px;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    justify-content: center;
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

.google-reviews {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    text-align: center;
}

.google-reviews-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* ── BEFORE/AFTER PREVIEW ────────────────── */
.ba-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

@media(max-width:768px) {
    .ba-preview-grid {
        grid-template-columns: 1fr;
    }
}

.ba-detail {
    font-size: var(--font-size-sm);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}

.ba-detail:last-child {
    border-bottom: none;
}

/* ── STORE CARDS ─────────────────────────── */
.store-card {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    text-align: center;
    transition: all var(--transition-base);
}

.store-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.store-card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-4);
}

.store-card p {
    font-size: var(--font-size-sm);
    margin-top: var(--space-3);
}

/* ── CTA BANNER ──────────────────────────── */
.cta-banner {
    position: relative;
    padding: var(--space-24) 0;
    text-align: center;
    overflow: hidden;
}

.cta-banner-bg {
    position: absolute;
    inset: 0;
}

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

.cta-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 30, 58, 0.85);
}

.cta-banner-content {
    position: relative;
    z-index: 2;
}

.cta-banner-content h2 {
    color: white;
    margin-bottom: var(--space-4);
}

.cta-banner-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-md);
}

/* ── POPUP BODY ──────────────────────────── */
.popup-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--color-text-muted);
    cursor: pointer;
    z-index: 1;
    transition: all var(--transition-fast);
}

.popup-close:hover {
    background: var(--color-primary);
    color: white;
}

.popup-img {
    height: 180px;
    overflow: hidden;
    background: var(--color-accent);
}

.popup-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-body {
    padding: var(--space-8);
}

.popup-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    color: var(--color-secondary);
    line-height: 1.2;
}

.popup-desc {
    color: var(--color-text-muted);
    margin-top: var(--space-3);
    font-size: var(--font-size-sm);
}

.popup-form input {
    margin-bottom: 0;
}

.popup-terms {
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    margin-top: var(--space-4);
    text-align: center;
}

.popup-terms a {
    color: var(--color-primary);
}

.popup-success {
    text-align: center;
    padding: var(--space-8);
}

.popup-success-icon {
    font-size: 3rem;
    color: var(--color-success);
    margin-bottom: var(--space-4);
}

.popup-success h3 {
    color: var(--color-secondary);
    margin-bottom: var(--space-2);
}

/* Inicio: Carousel principal (nuevo) */
.home-carousel {
  position: relative;
  height: 560px;
  width: 100%;
  overflow: hidden;
  margin-bottom: var(--space-16);
  border-radius: var(--radius-2xl);
}

.home-carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-slide {
  flex: 0 0 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.home-slide .slide-overlay { 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%); 
}

.home-slide .slide-content { 
    position: absolute; 
    bottom: 48px; 
    left: 48px; 
    color: #fff; 
    z-index: 2; 
    max-width: 50%;
}

.home-slide h2 { 
    font-size: clamp(1.75rem, 3vw, 2.5rem); 
    font-weight: var(--font-weight-black); 
    margin: 0 0 12px; 
    letter-spacing: -0.02em;
}

.home-slide p { 
    margin: 0 0 16px; 
    color: rgba(255,255,255,0.85); 
    font-size: var(--font-size-md);
}

.carousel-control { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    z-index: 3; 
    width: 48px; 
    height: 48px; 
    background: rgba(255,255,255,0.95); 
    border: none; 
    border-radius: var(--radius-full); 
    cursor: pointer; 
    font-size: 24px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--color-gray-700);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    opacity: 0;
}

.home-carousel:hover .carousel-control {
    opacity: 1;
}

.carousel-control:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.left { left: 20px; }
.carousel-control.right { right: 20px; }

.carousel-dots { 
    position: absolute; 
    bottom: 20px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    gap: 10px; 
    z-index: 3; 
}

.carousel-dots .dot { 
    width: 10px; 
    height: 10px; 
    min-width: 10px;
    min-height: 10px;
    flex: 0 0 auto;
    border-radius: 50%; 
    background: rgba(255,255,255,0.4); 
    cursor: pointer; 
    transition: all var(--transition-base); 
    border: none;
    padding: 0;
}

.carousel-dots .dot:hover {
    background: rgba(255,255,255,0.7);
    transform: scale(1.2);
}

.carousel-dots .dot.active { 
    background: var(--color-primary); 
    width: 28px; 
    min-width: 28px;
    min-height: 10px;
    border-radius: 5px; 
}

@media (max-width: 768px) {
  .home-carousel { 
      height: 380px; 
      border-radius: var(--radius-xl);
      margin-bottom: var(--space-10);
  }
  .home-slide .slide-content { 
      max-width: 90%; 
      bottom: 60px;
      left: 20px;
      right: 20px;
  }

  .home-slide .slide-content .btn {
      width: fit-content;
      max-width: 100%;
      min-width: 0;
      white-space: normal;
      line-height: 1.2;
      text-align: center;
  }
  .carousel-control {
      width: 40px;
      height: 40px;
      font-size: 20px;
      opacity: 1;
  }
  .carousel-control.left { left: 12px; }
  .carousel-control.right { right: 12px; }

  .carousel-dots {
      bottom: 14px;
      gap: 7px;
  }

  .carousel-dots .dot {
      width: 7px;
      height: 7px;
      min-width: 7px;
      min-height: 7px;
  }

  .carousel-dots .dot.active {
      width: 18px;
      min-width: 18px;
      min-height: 7px;
      border-radius: 999px;
  }

  .slider-controls {
      gap: var(--space-3);
      margin-top: var(--space-6);
  }

  .slider-nav-btn {
      width: 40px;
      height: 40px;
      font-size: 1.25rem;
      flex: 0 0 40px;
  }

  .slider-dots {
      gap: 7px;
      max-width: 140px;
      padding: var(--space-2) 0;
  }

  .slider-dot {
      width: 7px;
      height: 7px;
      min-width: 7px;
      min-height: 7px;
  }

  .slider-dot.active {
      width: 18px;
      min-width: 18px;
      min-height: 7px;
      border-radius: 999px;
  }
}

/* Mobile animations - simplified for performance */
@media (max-width: 768px) {
  .hero-badge {
    animation: fadeInUp 0.5s ease-out both;
  }
  
  .hero-title {
    animation: fadeInUp 0.6s ease-out 0.2s both;
  }
  
  .hero-subtitle {
    animation: fadeInUp 0.6s ease-out 0.3s both;
  }
  
  .hero-actions {
    animation: fadeInUp 0.6s ease-out 0.4s both;
  }
  
  .hero-trust {
    animation: fadeInUp 0.6s ease-out 0.5s both;
  }
}
/* Fin del carrusel */
