:root {
    /* Custom 4-Color Theme Layout */
    --primary-color: #f43ab0;
    /* Pink */
    --primary-gradient: linear-gradient(135deg, #f43ab0 0%, #e43480 100%);
    --secondary-gradient: linear-gradient(135deg, #ead4c0 0%, #ffffff 100%);
    --header-bg: rgba(234, 212, 192, 0.85);
    /* Scallop Seashell */

    --text-color: #4c3260;
    /* Purple */
    --accent-color: #e43480;
    /* Fuchsia */
    --bg-color: #ead4c0;
    /* Scallop Seashell */

    --card-bg: #ffffff;
    --card-organic-bg: #ffffff;
    --card-meta-bg: #4c3260;
    /* Purple */

    --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, #ead4c0 0%, #ffffff 100%);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ========================
   MODERN INDEX REDESIGN
   ======================== */
.index-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(244, 58, 176, 0.15) 0%, rgba(234, 212, 192, 1) 40%, rgba(255, 255, 255, 1) 100%);
    overflow-x: hidden;
    color: var(--text-color);
}

.modern-navbar {
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
}

.modern-brand {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.modern-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 5% 60px 5%;
    min-height: 100vh;
    gap: 50px;
    position: relative;
    z-index: 10;
}

.hero-left {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(244, 58, 176, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.1;
    color: var(--text-color);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-features {
    list-style: none;
    margin-bottom: 40px;
}

.hero-features li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1.05rem;
    color: #333;
    font-weight: 600;
}

.hero-features li svg {
    width: 20px;
    height: 20px;
    fill: var(--primary-color);
    margin-right: 12px;
}

.hero-right {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-cards {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 500px;
}

.float-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 24px;
    width: 280px;
    transition: transform 0.3s ease;
}

.float-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.card-1 {
    top: 20px;
    left: 0;
    animation: floatAnim 6s ease-in-out infinite;
    z-index: 3;
}

.card-2 {
    top: 180px;
    right: 0;
    animation: floatAnim 8s ease-in-out infinite alternate;
    z-index: 2;
}

.card-3 {
    bottom: 20px;
    left: 40px;
    animation: floatAnim 7s ease-in-out infinite reverse;
    z-index: 1;
}

@keyframes floatAnim {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0);
    }
}

.float-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(244, 58, 176, 0.1);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.float-card h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--text-color);
}

.float-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Responsive Index */
@media (max-width: 992px) {
    .modern-hero {
        flex-direction: column;
        padding-top: 100px;
        text-align: center;
    }

    .hero-features li {
        justify-content: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .floating-cards {
        height: 600px;
        margin-top: 40px;
    }

    .card-1 {
        left: 50%;
        transform: translateX(-50%);
        animation: none;
    }

    .card-2 {
        top: 200px;
        right: 50%;
        transform: translateX(50%);
        animation: none;
    }

    .card-3 {
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        animation: none;
    }
}

@media (max-width: 500px) {
    .hero-title {
        font-size: 2.2rem;
    }
}

.cta-button {
    display: inline-block;
    padding: 14px 28px;
    background: var(--accent-color);
    background: var(--primary-gradient);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(244, 58, 176, 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: var(--primary-color);
    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(244, 58, 176, 0.2);
    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: var(--primary-color);
    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: var(--accent-color);
    /* 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: var(--primary-color);
    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: var(--primary-color);
    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: var(--card-meta-bg);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.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: rgba(234, 212, 192, 0.3);
    /* Scallop Seashell 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: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: background 0.2s;
}

.stepper-btn:hover {
    background: rgba(234, 212, 192, 0.5);
}

.stepper-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    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: var(--primary-color);
}

.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: var(--accent-color);
    /* Fuchsia */
    border-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 5px 15px rgba(228, 52, 128, 0.4);
    transform: scale(1.05);
}

.toggle-btn.active:hover {
    background: var(--primary-color);
    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: var(--accent-color);
    font-size: 1.2rem;
    line-height: 1rem;
}

.card-meta .features-list li::before {
    color: var(--primary-color);
}

/* Badge */
.organic-badge {
    text-align: center;
    background: rgba(234, 212, 192, 0.5);
    /* Scallop Seashell tint */
    color: var(--primary-color);
    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: var(--primary-color);
}

.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: var(--primary-color);
    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 var(--primary-color);
    padding: 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 20px;
    background: rgba(234, 212, 192, 0.3);
    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 var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 20px;
    color: var(--primary-color);
    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 var(--accent-color);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.view-details-btn:hover {
    background: rgba(234, 212, 192, 0.3);
    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;
}