/* pure.css - Custom Design System for Frubi */

:root {
    --primary: #3CB878;
    --primary-dark: #2e915d;
    --text-dark: #1D1D1B;
    --text-muted: #6B7280;
    --bg-light: #F9FAFB;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
    --font-grotesk: 'Space Grotesk', sans-serif;
    --font-handy: 'Caveat', cursive;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 900;
}

.font-handy {
    font-family: var(--font-handy);
}

.font-grotesk {
    font-family: var(--font-grotesk);
}

/* Layout Components */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Nav */
.top-banner {
    background-color: var(--primary);
    color: white;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    word-wrap: break-word;
}

header {
    background: white;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #F3F4F6;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 110px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.125rem;
    text-transform: lowercase;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.logo, 
.logo a,
.logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: flex;
    align-items: center;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
}

.mobile-menu-toggle {
    display: none;
}

.icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

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

.hero-bg img,
.hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

#hero-video {
    z-index: 2;
    transition: opacity 1s ease-in-out;
}

.hero-static-img {
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-typography {
    margin-bottom: 2rem;
    line-height: 0.7;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 50px);
    color: #1D1D1B;
    letter-spacing: -0.025em;
    margin-bottom: 0;
    line-height: 1.1;
}

.hero-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(3.5rem, 10vw, 96px);
    color: var(--primary);
    letter-spacing: -0.05em;
    line-height: 0.9;
    margin: 0;
}

.hero-bottom-text {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    line-height: 1;
    margin-top: 0.5rem;
}

.hero-pentru {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.25rem, 3vw, 28px);
    color: #1D1D1B;
    text-transform: lowercase;
}

.hero-tine {
    font-family: var(--font-handy);
    font-weight: 700;
    font-size: clamp(2.5rem, 8vw, 80px);
    color: #1D1D1B;
    line-height: 1;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 9999px;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 10px 15px -3px rgba(60, 184, 120, 0.3);
    transition: transform 0.3s, background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Product Grid */
.products-section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 3rem;
}

.product-grid {
    display: flex;
    justify-content: center;
    column-gap: 2rem;
    row-gap: 180px;
    padding-top: 160px;
    flex-wrap: wrap;
}

.product-card {
    position: relative;
    text-align: center;
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    background-color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease-in-out;
    z-index: 1;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('/assets/background-afina.jpeg');
    background-size: cover;
    background-position: center;
    border-radius: 30px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: -1;
}

.product-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

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

.product-card:hover .product-name,
.product-card:hover .product-description {
    color: white;
}

/* Clean Product Card Variants */
.product-card {
    background-color: white;
}

/* Card V1 - Floating + Original BG */
.card-v1::before {
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('/assets/background-nectare-mere-si-afine.jpeg');
}

/* Card V2 - Inset + Blueberry BG (Original Colors) */
.card-v2::before {
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('/assets/background-afina.jpeg');
}

/* Card V3 - Inset + Blueberry BG (Original Colors) */
.card-v3::before {
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('/assets/background-afina.jpeg');
}

/* Hover general */
.product-card:hover::before {
    opacity: 1;
}

.product-card:hover .product-name,
.product-card:hover .product-description {
    color: white;
}

.product-card:hover .add-to-cart {
    background: white;
    color: var(--primary);
}

/* Remove old variant styles to avoid conflicts */
.product-card-red, .product-card-blue {
    background-color: white !important;
}


.product-card-red::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background-image: linear-gradient(rgba(220, 38, 38, 0.8), rgba(220, 38, 38, 0.8)), url('/assets/background-afina.jpeg');
    background-size: cover;
    background-position: center;
    border-radius: 30px;
    transition: opacity 0.3s ease-in-out;
    z-index: -1;
}

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

.product-card-red .product-name,
.product-card-red .product-description {
    color: white;
}

.product-card-red .product-description {
    opacity: 0.9;
}

.product-card-red .add-to-cart {
    background: white;
    color: #DC2626;
}

.product-card-red .add-to-cart:hover {
    background: #f0f0f0;
}

/* Inset Card Variant */
.product-card-inset {
    overflow: hidden;
}

.product-card-inset .product-img-wrapper {
    position: relative;
    top: 0;
    transform: scale(1);
    margin: 0;
    height: 350px;
    padding: 20px;
}

.product-card-inset .product-img-wrapper img {
    object-fit: contain;
}

/* Blue Card Variant */
.product-card-blue {
    background-color: #1E40AF;
    color: white;
    overflow: hidden;
}

.product-card-blue::before {
    opacity: 0;
    background-image: linear-gradient(rgba(30, 64, 175, 0.8), rgba(30, 64, 175, 0.8)), url('/assets/background-afina.jpeg');
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    border-radius: 30px;
    transition: opacity 0.3s ease-in-out;
    z-index: -1;
}

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

.product-card-blue .product-name,
.product-card-blue .product-description {
    color: white;
}

.product-card-blue .product-description {
    opacity: 0.9;
}

.product-card-blue .product-img-wrapper {
    position: relative;
    top: 0;
    transform: scale(1);
    margin: 0;
    height: 350px;
    padding: 20px;
    background: transparent;
}

.product-card-blue .product-img-wrapper img {
    object-fit: contain;
}

.product-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: 0.3s;
    position: absolute;
    top: -160px;
    transform: scale(1.4);
    pointer-events: none;
    user-select: none;
}

.product-img-custom {
  transform: scale(1.4);
  margin-left: -30px;
  margin-top: 10px;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.product-image-colider {
    width: 100%;
    height: 280px;
}

.product-content {
    margin: 20px;
}

.product-name {
    font-size: 16px;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: left;
    transition: color 0.3s ease-in-out;
}

.product-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
    text-align: left;
    transition: color 0.3s ease-in-out;
}

.product-price {
    font-family: var(--font-grotesk);
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.add-to-cart {
    position: relative;
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.875rem;
    border-radius: 10px;
    font-family: var(--font-grotesk);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
}

.add-to-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Product Stars */
.panel-produs-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.star {
    width: 20px;
    height: 20px;
    background-color: #E5E7EB;
    /* gray-200 */
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.star.fill {
    background-color: #FBBF24;
    /* yellow-400 */
}

/* Discount Popup */
.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.popup-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 2rem;
    overflow: hidden;
    position: relative;
    padding: 3rem;
    text-align: center;
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-video {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    pointer-events: none;
}

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

.close-popup {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.popup-inner {
    position: relative;
    z-index: 10;
}

.popup-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    font-family: var(--font-sans);
    text-align: center;
    text-transform: uppercase;
    -webkit-appearance: none;
    appearance: none;
    background-color: white;
}

/* Feature Belt */
.feature-belt {
    padding: 4rem 0;
    background: #F9FAFB;
}

.belt-wrapper {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-right: 1px solid #F3F4F6;
}

.feature-item:last-child {
    border-right: none;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(60, 184, 120, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .belt-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .feature-item {
        border-right: none;
    }

    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        height: calc(100dvh - 80px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        padding-bottom: env(safe-area-inset-bottom);
        gap: 1.5rem;
        transition: 0.3s ease-in-out;
        z-index: 100;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-divider {
        display: none;
    }

    .hero {
        height: auto;
        min-height: 60vh;
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .product-grid {
        padding-top: 120px;
        column-gap: 1.5rem;
        row-gap: 140px;
    }

    .product-img-wrapper {
        top: -100px;
        transform: scale(1.15);
    }

    .product-image-colider {
        height: 220px;
    }
}

@media (max-width: 700px) {
    .product-grid {
        row-gap: 180px;
    }
    
    .product-image-colider {
        height: 200px;
    }

    .product-img-wrapper {
        top: -160px;
        transform: scale(1.3);
    }
}

@media (max-width: 480px) {
    .belt-wrapper {
        grid-template-columns: 1fr;
    }

    .top-banner {
        font-size: 0.75rem;
    }

    .logo img {
        height: 60px;
    }

    .main-nav {
        height: 80px;
    }

    .nav-links {
        top: 80px;
        height: calc(100vh - 80px);
    }
}

/* Cart Drawer */
.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease-in-out;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cart-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

.cart-overlay.active .cart-container {
    transform: translateX(0);
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-muted);
    margin-top: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: #F9FAFB;
    padding: 5px;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #F3F4F6;
    padding: 4px 8px;
    border-radius: 8px;
}

.cart-item-controls button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #F3F4F6;
    background: #F9FAFB;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.checkout-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    text-align: center;
}
