:root {
    /* Pink Gradient Theme */
    --primary-color: #ff3366;
    /* Hot Pink */
    --primary-gradient: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%);
    --secondary-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    --header-bg: rgba(255, 255, 255, 0.9);

    --text-color: #333333;
    --accent-color: #ff3366;
    --bg-color: #fff0f5;
    /* Lavender Blush */

    --card-bg: #ffffff;
    --card-organic-bg: #fff;
    --card-meta-bg: #000000;

    --font-main: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background: var(--bg-color);
    /* Fallback */
    background: linear-gradient(180deg, #fff0f5 0%, #ffe4e1 100%);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ========================
   INDEX PAGE
   ======================== */
.index-page {
    display: flex;
    flex-direction: column;
    /* Allow content to stack */
    justify-content: flex-start;
    /* Start from top */
    align-items: center;
    min-height: 100vh;
    /* Allow growing */
    height: auto;
    text-align: center;
    padding: 80px 20px 40px 20px;
    /* Add safe spacing top/bottom */
    background: var(--secondary-gradient);
    overflow-x: hidden;
}

.hero-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.hero-container h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #d81b60;
    min-height: 3.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
}

.cursor {
    font-weight: bold;
    color: #d81b60;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.fade-in-text {
    font-size: 1.2rem;
    color: #444;
    margin-bottom: 30px;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.special-offer-box {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 20px;
    border-radius: 16px;
    max-width: 500px;
    margin: 0 auto 30px auto;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transition: opacity 0.5s ease-in;
    /* Safety Fallback: Force fade in via CSS if JS fails or lags */
    animation: forceFadeIn 0.5s ease-in forwards;
    animation-delay: 0.5s;
}

@keyframes forceFadeIn {
    to {
        opacity: 1;
    }
}

.special-offer-box h3 {
    font-size: 1rem;
    color: #d81b60;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.special-offer-box p {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 5px;
}

.special-offer-box small {
    display: block;
    margin-top: 10px;
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
}

.cta-button {
    display: inline-block;
    padding: 14px 28px;
    background: #ff3366;
    background: linear-gradient(45deg, #ff3366, #ff6b6b);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.cta-button:active {
    transform: scale(0.98);
}



.admin-link {
    position: fixed !important;
    top: 25px !important;
    right: 25px !important;

    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 50%;

    font-size: 1.8rem;
    color: #d81b60;
    text-decoration: none;
    z-index: 1500;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background 0.3s;
}

.admin-link:hover {
    transform: rotate(90deg) scale(1.1);
    background: #fff;
}

@media (max-width: 480px) {
    .admin-link {
        top: 20px !important;
        right: 20px !important;
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}

/* ========================
   BUILDER PAGE
   ======================== */
.builder-page {
    padding-top: 160px;
    /* Reduced from 220px since badge no longer expands header */
    padding-bottom: 100px;
    overflow-x: hidden;
    background-attachment: fixed;
}

/* STICKY HEADER FIX */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    /* Increased opacity */
    backdrop-filter: blur(12px);
    padding: 15px 20px;
    box-shadow: 0 2px 15px rgba(255, 51, 102, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-sizing: border-box;
}

/* Toast - Ensure it is hidden completely when not valid */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    z-index: 2001;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.9rem;
    width: 90%;
    max-width: 400px;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.total-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.total-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: #d81b60;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    overflow: visible;
    min-width: 150px;
    text-align: center;
}

.savings-badge {
    position: absolute;
    bottom: -32px;
    /* Hangs below the header */
    left: 50%;
    transform: translateX(-50%);

    font-size: 0.8rem;
    color: #fff;
    background: #4caf50;
    /* Solid Green for visibility */
    padding: 4px 16px;
    border-radius: 0 0 12px 12px;
    /* Rounded bottom corners only */

    display: none;
    /* Controlled by JS */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: -1;
    /* Sits 'behind' the main header bar visually if needed */
    white-space: nowrap;
}

/* CARDS */
.cards-container {
    display: flex;
    flex-direction: column;
    /* Stack vertically on mobile */
    gap: 20px;
    padding: 20px;
    align-items: center;
    /* Center cards */
}

.cards-container::-webkit-scrollbar {
    display: none;
}

.card {
    width: 100%;
    max-width: 500px;
    /* Increased max-width for mobile */
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Changed from space-between */
    min-height: auto;
    /* Allow to grow */
    position: relative;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

@media (min-width: 1024px) {

    /* Changed breakpoint to accommodate wider cards */
    .cards-container {
        display: flex;
        /* Ensure flex is active */
        flex-direction: row;
        justify-content: center;
        overflow-x: visible;
        flex-wrap: nowrap;
        /* Prevent wrapping for equal columns if possible, or wrap with alignment */
        align-items: stretch;
        /* Stretch cards to equal height */
        gap: 20px;
        max-width: 1200px;
        /* Constrain max width */
        margin: 0 auto;
    }

    .card {
        flex: 1;
        /* Equal width */
        min-width: 300px;
        max-width: 380px;
        margin: 0;
        /* Remove margin, use gap */
        display: flex;
        flex-direction: column;
    }
}

/* Subtext for features */
.feature-sub {
    font-size: 0.8rem;
    color: #888;
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

/* Details Content Styling within Card */
.details-content {
    margin-top: auto;
    /* Push to bottom */
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: left;
}

.details-content h3 {
    font-size: 0.9rem;
    /* Smaller heading */
    color: #333;
    margin-bottom: 12px;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* Best For Grid */
.best-for-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-left: 0;
    list-style: none;
}

.best-for-list li {
    background: #f5f5f5;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #555;
    text-align: center;
}

.details-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.details-content li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.details-content li::before {
    content: "•";
    color: #d81b60;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.details-content table th {
    background: #f9f9f9;
    color: #333;
    font-weight: 600;
}

.details-content table td {
    color: #666;
}

/* Organic Cards */
.card-organic {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.card-organic .card-header .title {
    font-size: 0.85rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #ff6b6b;
    margin-bottom: 8px;
    font-weight: 700;
}

.card-organic .card-header .subtext {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

/* Meta Card */
.card-meta {
    background: #000;
    background: linear-gradient(160deg, #1a1a1a 0%, #000000 100%);
    color: #fff;
    border: 1px solid #333;
}

.card-meta .card-header .title {
    color: #888;
    font-size: 0.85rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 700;
}

/* Stepper */
.stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff0f5;
    /* Light pink tint */
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 20px;
}

.stepper-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: #fff;
    border-radius: 12px;
    font-size: 1.4rem;
    cursor: pointer;
    color: #d81b60;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: background 0.2s;
}

.stepper-btn:hover {
    background: #ffeef2;
}

.stepper-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    width: 50px;
    text-align: center;
}

/* Pricing Info */
.price-info {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-info span {
    font-weight: 700;
    color: #d81b60;
}

.card-meta .price-info span {
    color: #fff;
}

.meta-price-display {
    text-align: center;
    margin: 20px 0;
}

.original-price {
    text-decoration: line-through;
    color: #666;
    font-size: 1rem;
    display: block;
}

.final-price {
    font-size: 2.2rem;
    font-weight: 800;
    display: block;
    background: -webkit-linear-gradient(45deg, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.meta-condition-text {
    font-size: 0.8rem;
    text-align: center;
    color: #888;
    margin-top: 5px;
}

/* Meta Toggle Switch */
.meta-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 60px;
}

.toggle-btn {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.toggle-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.toggle-btn.active {
    background: #4caf50;
    /* Green for selected */
    border-color: #4caf50;
    color: #fff;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
    transform: scale(1.05);
}

.toggle-btn.active:hover {
    background: #43a047;
    transform: scale(1.05) translateY(-2px);
}


/* Features */
.features-list li {
    font-size: 0.85rem;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    opacity: 0.85;
}

.features-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ff6b6b;
    font-size: 1.2rem;
    line-height: 1rem;
}

.card-meta .features-list li::before {
    color: #d81b60;
}

/* Badge */
.organic-badge {
    text-align: center;
    background: #ffeef2;
    color: #d81b60;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.organic-badge.visible {
    opacity: 1;
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 450px;
    border-radius: 24px;
    padding: 30px;
    position: relative;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.breakup-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.breakup-row.total {
    border-bottom: none;
    border-top: 2px solid #eee;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 800;
    font-size: 1.2rem;
    color: #d81b60;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-main);
    transition: border 0.2s;
}

.form-input:focus {
    border-color: #d81b60;
    outline: none;
}

.upi-box {
    background: #f0f0f0;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    font-family: monospace;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-btn {
    background: #ccc;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

.file-upload-box {
    border: 2px dashed #ff9a9e;
    padding: 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 20px;
    background: #fff0f5;
    cursor: pointer;
}



/* Loading Overlay Global */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Video Wrapper Styles */
/* Video Wrapper Styles */
.video-wrapper {
    width: 100%;
    max-width: 400px !important;
    /* Forces size reduction */
    margin: 0 auto 20px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-wrapper video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #d81b60;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 20px;
    color: #d81b60;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* VIEW DETAILS BTN */
.card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    text-align: center;
}

.view-details-btn {
    background: transparent;
    border: 1px solid #ff3366;
    color: #ff3366;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.view-details-btn:hover {
    background: #fff0f5;
    transform: translateY(-2px);
}

.card-meta .view-details-btn {
    border-color: #666;
    color: #aaa;
}

.card-meta .view-details-btn:hover {
    background: #333;
    color: #fff;
    border-color: #fff;
}

.details-body p {
    margin-bottom: 15px;
}

.details-body ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.details-body li {
    margin-bottom: 5px;
}