/* ============================================
   SILKY FUSION — Components
   ============================================ */

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn:hover::after {
    transform: translateX(100%);
}

.btn-primary {
    background-color: var(--color-cta);
    color: var(--color-primary);
    border-color: var(--color-cta);
}

.btn-primary:hover {
    background-color: var(--color-cta-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-secondary:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-dark {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn-dark:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-gold {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-light));
    color: var(--color-white);
    border: none;
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--color-secondary-dark), var(--color-secondary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-outline-white {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline-white:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

.btn-sm { padding: 10px 24px; font-size: var(--text-xs); }
.btn-lg { padding: 18px 42px; font-size: var(--text-base); }

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
}

/* === Cards === */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-body {
    padding: var(--space-lg);
}

.card-title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
}

.card-price {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary);
}

.card-price .original {
    text-decoration: line-through;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-regular);
    margin-left: var(--space-sm);
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--glass-shadow);
}

/* Product Card */
/* Product Card (Premium Theme) */
.product-card {
    position: relative;
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: var(--color-secondary);
}

.product-card .image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    margin: 12px;
    border-radius: 16px;
    background: #fdfbf7;
}

.product-card .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}

.product-card:hover .image-wrapper img {
    transform: scale(1.1);
}

.product-card .badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #1a1a1a;
    color: #fff;
    padding: 4px 10px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 4px;
    z-index: 5;
    text-transform: uppercase;
}

.product-card .product-info {
    padding: 0 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .product-category {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 0;
}

.product-card .product-name {
    font-family: var(--font-heading);
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 8px;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
}

.btn-add-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: #111;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-pill:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

.p-approval-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--color-secondary-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.p-short-desc {
    font-size: 13px;
    color: #777;
    margin-bottom: 16px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.p-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card .product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-secondary-dark);
    font-family: var(--font-heading);
}

.currency-symbol {
    font-family: var(--font-body);
    font-weight: 500;
    margin-right: 2px;
    font-size: 0.9em;
    vertical-align: baseline;
}

.p-rating {
    font-size: 12px;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 4px;
}


/* === Forms === */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--color-gray);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    color: var(--color-text);
    background: var(--color-white);
    transition: all var(--transition-fast);
}

.form-input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

/* === Section Headers === */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-header .eyebrow {
    font-family: var(--font-accent);
    font-size: var(--text-lg);
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
    font-style: italic;
    letter-spacing: 2px;
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    color: var(--color-text-light);
    font-size: var(--text-md);
    max-width: 600px;
    margin: 0 auto;
}

/* === Comparison Table === */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-table thead {
    background: var(--color-primary);
    color: var(--color-white);
}

.comparison-table th {
    padding: var(--space-lg);
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    text-align: left;
}

.comparison-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-light-gray);
}

.comparison-table tbody tr:nth-child(even) {
    background: var(--color-cream);
}

.comparison-table tbody tr:hover {
    background: var(--color-cta);
}

/* === Testimonial Card === */
.testimonial-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-card);
    position: relative;
    transition: all var(--transition-base);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: var(--space-md);
    left: var(--space-lg);
    font-family: var(--font-heading);
    font-size: 80px;
    color: var(--color-accent-light);
    line-height: 1;
}

.testimonial-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.testimonial-text {
    font-size: var(--text-md);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
    font-style: italic;
    padding-top: var(--space-xl);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
}

.testimonial-name {
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-sm);
}

.testimonial-role {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.stars {
    color: var(--color-secondary);
    font-size: var(--text-lg);
    letter-spacing: 2px;
}

/* === Toast / Notification === */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-toast);
    transform: translateY(120%);
    opacity: 0;
    transition: all var(--transition-base);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success { border-left: 4px solid var(--color-success); }
.toast-error { border-left: 4px solid var(--color-error); }

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

/* === Loading Spinner === */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-light-gray);
    border-top-color: var(--color-secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Breadcrumb === */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    padding: var(--space-md) 0;
}

.breadcrumb a {
    color: var(--color-text-muted);
}

.breadcrumb a:hover {
    color: var(--color-secondary);
}

.breadcrumb .separator {
    color: var(--color-gray);
}

.breadcrumb .current {
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

/* === Video Modal === */
.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.video-modal-content {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 9/16;
    background: #000;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(212, 165, 116, 0.4);
}

.modal-close svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    stroke-width: 2.5;
}


@media (min-width: 1024px) {
    .video-modal-content {
        max-width: 800px;
        aspect-ratio: 16/9;
    }
}

/* === Auth Required Notification === */
.auth-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--color-white);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    z-index: 11000;
    text-align: center;
    max-width: 400px;
    width: 90%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.auth-notification .icon-box {
    width: 64px;
    height: 64px;
    background: var(--color-cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--color-secondary-dark);
}

.auth-notification h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--color-primary);
}

.auth-notification p {
    color: var(--color-text-light);
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 15px;
}

.auth-notification .auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-notification .btn-auth {
    padding: 14px 24px;
    border-radius: 99px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.auth-notification .btn-login {
    background: var(--color-primary);
    color: white;
}

.auth-notification .btn-login:hover {
    background: #000;
    transform: translateY(-2px);
}

.auth-notification .btn-register {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

.auth-notification .btn-register:hover {
    background: var(--color-cream);
    transform: translateY(-2px);
}

.auth-notification .btn-close-auth {
    margin-top: 16px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* === Video Items === */
.testimonial-card-v2 {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 9/16;
    border: 1px solid rgba(212, 165, 116, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.testimonial-card-v2:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(212, 165, 116, 0.25);
    border-color: var(--color-secondary);
}

.testimonial-video-wrap {
    width: 100%;
    height: 100%;
    position: relative;
}

.testimonial-video-wrap video,
.testimonial-video-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

/* --- Global Play Icon --- */
.play-icon-standard {
    width: 60px;
    height: 60px;
    background: #d4a574; /* Brand gold */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #000;
}

.play-icon-standard svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-left: 4px; /* Offset for optical centering */
}

.testimonial-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.testimonial-card-v2:hover .testimonial-play-overlay {
    opacity: 1;
    background: rgba(0,0,0,0.3);
}

.testimonial-play-overlay .play-icon-standard {
    transform: scale(0.8);
}

/* --- SF Carousel Component (Mobile Optimized) --- */
.sf-carousel-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

/* Default state (Desktop): Hide nav and dots, carousel classes are inert */
.sf-carousel-nav, .sf-carousel-dots {
    display: none !important;
}

@media (min-width: 769px) {
    .mobile-only-testimonial {
        display: none !important;
    }
}

/* Mobile: Activate Carousel */
@media (max-width: 1024px) {
    .sf-carousel-container {
        overflow: hidden !important;
        position: relative !important;
        width: 100% !important;
    }

    .sf-carousel-track {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        padding: 20px 0 40px !important;
        width: 100% !important;
        min-width: 100%;
        animation: none !important;
        overflow: visible !important;
        scroll-snap-type: none !important;
        transition: transform 0.4s ease !important;
        will-change: transform;
        touch-action: pan-y;
    }

    .sf-carousel-item {
        flex: 0 0 75vw !important;
        margin: 0 8px !important;
        display: block !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .desktop-duplicate {
        display: none !important;
    }

    .sf-carousel-nav {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 100px;
        pointer-events: none;
        z-index: 2000;
    }

    .sf-carousel-prev,
    .sf-carousel-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        width: 48px;
        height: 48px;
        background: rgba(255, 255, 255, 0.95);
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        color: var(--color-primary);
        transition: background 0.2s, color 0.2s;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        pointer-events: auto;
    }

    .sf-carousel-prev {
        left: 5px;
    }

    .sf-carousel-next {
        right: 5px;
    }

    .sf-carousel-prev:active,
    .sf-carousel-next:active {
        background: var(--color-secondary);
        color: #fff;
    }

    .sf-carousel-dots {
        display: flex !important;
        justify-content: center;
        gap: 8px;
        padding: 10px 0 20px;
    }

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

    .sf-carousel-dot.active {
        background: var(--color-secondary);
        width: 24px;
        border-radius: 4px;
    }

    /* Specific overrides for How It Works carousel buttons */
    .how-it-works-section .sf-carousel-nav {
        bottom: 50%;
        transform: translateY(50%);
    }

    .how-it-works-section .sf-carousel-prev,
    .how-it-works-section .sf-carousel-next {
        width: 36px;
        height: 36px;
        background: rgba(17, 17, 17, 0.8);
        border: 1px solid rgba(212, 165, 116, 0.3);
        color: var(--color-secondary);
    }

    .how-it-works-section .sf-carousel-prev svg,
    .how-it-works-section .sf-carousel-next svg {
        width: 16px;
        height: 16px;
    }
}

.testimonial-card-v2:hover .testimonial-play-overlay .play-icon-standard {
    transform: scale(1);
}

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

@media (max-width: 640px) {
    .grid-4-v2 {
        grid-template-columns: 1fr;
    }
}
