    :root {
        --bg-color: #f6f9fc;
        --card-bg: #ffffff;
        --primary-blue: #635bff;
        --primary-hover: #0a2540;
        --success-green: #24b47e;
        --success-hover: #1c9666;
        --text-main: #424770;
        --text-dark: #0a2540;
        --border-color: #e6ebf1;
        --shadow: 0 7px 14px 0 rgba(60, 66, 87, 0.08), 0 3px 6px 0 rgba(0, 0, 0, 0.12);
    }

    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    body {
        font-family: 'Inter', sans-serif;
        background-color: var(--bg-color);
        color: var(--text-main);
        line-height: 1.6;
        padding: 40px 20px;
    }

    .container {
        max-width: 1100px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 40px;
    }

    @media (max-width: 900px) {
        .container {
            grid-template-columns: 1fr;
        }
    }

    /* --- LEFT SIDE: FORM --- */
    .form-card {
        background: var(--card-bg);
        padding: 40px;
        border-radius: 8px;
        box-shadow: var(--shadow);
    }

    h1 {
        font-size: 24px;
        font-weight: 700;
        color: var(--text-dark);
        margin-bottom: 30px;
    }

    .subtitle {
        color: var(--text-muted);
        margin-bottom: 32px;
        font-size: 15px;
    }

    .input-group {
        margin-bottom: 24px;
        width: 100%;
    }

    .input-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 24px;
    }

    .scan-header-row {
        grid-template-columns: 1fr 2fr;
    }

    .input-row .input-group {
        margin-bottom: 0;
    }

    @media (max-width: 600px) {

        .input-row,
        .scan-header-row {
            grid-template-columns: 1fr;
        }
    }

    label {
        display: block;
        font-weight: 600;
        font-size: 14px;
        margin-bottom: 8px;
        color: var(--text-dark);
    }



    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="tel"],
    select {
        width: 100%;
        padding: 14px 16px;
        border: 2px solid #e2e8f0;
        border: 2px solid #ced5de;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 500;
        color: var(--text-main);
        transition: all 0.2s ease;
        font-family: inherit;
        background: #f8fafc;
    }

    select {
        appearance: none;
        background-color: white;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23424770' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 1em;
        cursor: pointer;
    }

    input:focus,
    select:focus {
        outline: none;
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.1);
    }

    /* Update this in main.css */
    input::-webkit-input-placeholder,
    textarea::-webkit-input-placeholder {
        color: rgb(180, 180, 180) !important;
        opacity: 1;
    }

    input:-ms-input-placeholder,
    textarea:-ms-input-placeholder {
        color: rgb(180, 180, 180) !important;
        opacity: 1;
    }

    input::placeholder,
    textarea::placeholder {
        color: rgb(180, 180, 180) !important;
        opacity: 1;
    }

    /* --- CHECKBOXES --- */
    .checkbox-label {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 500;
        cursor: pointer;
        color: var(--text-dark);
        margin-bottom: 10px;
        user-select: none;
    }

    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--primary-blue);
        cursor: pointer;
    }

    /* --- SEGMENTED TOGGLES --- */
    .segmented-control {
        display: flex;
        background: #eeeef1;
        border: 2px solid #e2e8f0;
        padding: 4px;
        border-radius: 6px;
        margin-bottom: 24px;
    }

    .segmented-control input {
        display: none;
    }

    .segmented-control label {
        flex: 1;
        text-align: center;
        padding: 10px;
        margin-bottom: 0;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        border-radius: 4px;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .segmented-control label i {
        font-size: 16px;
        color: #8f9bb3;
        transition: color 0.2s ease;
    }

    .segmented-control input:checked+label {
        background: #fff;
        color: var(--primary-blue);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .segmented-control input:checked+label i {
        color: var(--primary-blue);
    }

    /* --- PILL BADGES --- */
    .badge-container {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 10px;
    }

    .badge {
        background: #e3e8ee;
        color: #4f566b;
        padding: 6px 14px;
        border-radius: 100px;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.025em;
    }

    .badge-label {
        font-size: 13px;
        color: #697386;
        margin-bottom: 12px;
        display: block;
    }

    /* --- RIGHT SIDE: SUMMARY & BUTTONS --- */
    .summary-card {
        background: var(--card-bg);
        padding: 30px;
        border-radius: 8px;
        box-shadow: var(--shadow);
        position: sticky;
        top: 40px;
        height: fit-content;
    }

    .summary-title {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 20px;
        color: var(--text-dark);
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .summary-logo {
        max-height: 45px;
        /* Adjust this value if your logo is too big or small */
        width: auto;
    }

    .cart-item {
        background: #f8fafc;
        border: 1px solid var(--border-color);
        padding: 16px;
        border-radius: 6px;
        margin-bottom: 16px;
        position: relative;
    }

    .cart-item-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 6px;
    }

    .cart-item-title {
        font-weight: 700;
        color: var(--text-dark);
        font-size: 15px;
    }

    .cart-item-details {
        font-size: 12px;
        color: #697386;
        line-height: 1.5;
    }

    .cart-item-price {
        font-weight: 700;
        color: var(--primary-blue);
        font-size: 14px;
    }

    .delete-btn {
        background: none;
        border: none;
        color: #ef4444;
        cursor: pointer;
        padding: 2px 6px;
        font-size: 14px;
        transition: color 0.2s;
    }

    .delete-btn:hover {
        color: #b91c1c;
    }

    .price-box {
        margin-top: 10px;
        padding-top: 20px;
        border-top: 2px solid var(--border-color);
    }

    .price-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
    }

    .total-price {
        font-size: 24px;
        font-weight: 700;
        color: var(--primary-blue);
    }

    .btn-primary,
    .btn-secondary {
        display: block;
        width: 100%;
        text-align: center;
        padding: 16px;
        border-radius: 4px;
        text-decoration: none;
        font-weight: 600;
        margin-top: 20px;
        transition: background 0.2s;
        cursor: pointer;
        border: none;
        font-size: 16px;
    }

    .btn-primary {
        background: var(--primary-blue);
        color: white;
    }

    .btn-primary:hover {
        background: var(--primary-hover);
    }

    .btn-secondary {
        background: var(--success-green);
        color: white;
        margin-top: 12px;
    }

    .btn-secondary:hover {
        background: var(--success-hover);
    }

    .discount-text {
        color: var(--success-green);
        font-size: 12px;
        font-weight: 700;
        margin-left: 4px;
    }

    /* --- CHECKOUT SPECIFIC STYLES --- */
    .checkout-container {
        max-width: 800px;
        margin: 40px auto 0 auto;
        display: none;
    }

    /* --- REVEAL AFTER PAGES ENTERED --- */
    .reveal-section {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.35s ease, opacity 0.35s ease;
        opacity: 0;
    }

    .reveal-section.active {
        grid-template-rows: 1fr;
        opacity: 1;
        margin-top: 10px;
    }

    .reveal-inner {
        overflow: visible;
        /* Allow tooltips to render outside the reveal container */
    }

    .section-heading {
        font-size: 18px;
        font-weight: 600;
        margin: 30px 0 15px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-dark);
    }

    .collapsible-group {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.3s ease-out;
        opacity: 0;
    }

    .collapsible-group.active {
        grid-template-rows: 1fr;
        opacity: 1;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .collapsible-inner {
        overflow: hidden;
    }

    .tooltip-icon {
        color: #8f9bb3;
        margin-left: 5px;
        cursor: help;
        font-size: 14px;
    }

    .fade-in {
        animation: fadeIn 0.4s ease-out forwards;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* --- FIELD ATTENTION EFFECTS --- */
    .effect-glow {
        animation: glow 1.5s infinite alternate;
    }

    @keyframes glow {
        from {
            border-color: var(--border-color);
        }

        to {
            border-color: var(--primary-blue);
            box-shadow: 0 0 8px rgba(99, 91, 255, 0.6);
        }
    }

    .effect-flash {
        animation: flash 1s;
    }

    @keyframes flash {
        0% {
            background-color: #fff;
        }

        50% {
            background-color: #e0e7ff;
            border-color: var(--primary-blue);
        }

        100% {
            background-color: #f8fafc;
        }
    }

    /* --- PULSE ATTENTION EFFECT --- */
    @keyframes pulse-attention {
        0% {
            transform: scale(1);
            opacity: 1;
        }

        50% {
            transform: scale(1.03);
            opacity: 0.6;
        }

        100% {
            transform: scale(1);
            opacity: 1;
        }
    }

    .pulse-attention {
        animation: pulse-attention 0.8s ease-in-out 3;
    }

    /* --- PAYMENT & SHIPPING STYLES --- */
    .payment-option {
        display: flex;
        align-items: center;
        padding: 16px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        margin-bottom: 12px;
        cursor: pointer;
        transition: all 0.2s;
        background: #fff;
    }

    .payment-option:hover {
        border-color: var(--primary-blue);
        background: #f8fafc;
    }

    .payment-option input[type="radio"] {
        margin-right: 15px;
        width: 20px;
        height: 20px;
        accent-color: var(--primary-blue);
        cursor: pointer;
    }

    .payment-label {
        font-weight: 600;
        font-size: 15px;
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        cursor: pointer;
        color: var(--text-dark);
    }

    .payment-icon {
        font-size: 20px;
        color: var(--primary-blue);
        width: 30px;
        text-align: center;
    }

    /* --- REVIEW PANEL STYLES --- */
    .review-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
        margin-bottom: 25px;
    }

    .review-section {
        background: #f8fafc;
        border: 1px solid var(--border-color);
        padding: 16px;
        border-radius: 6px;
    }

    .review-section h3 {
        font-size: 13px;
        text-transform: uppercase;
        color: #697386;
        margin-bottom: 12px;
        letter-spacing: 0.05em;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 8px;
        font-weight: 700;
    }

    .review-text {
        font-size: 14px;
        color: var(--text-dark);
        margin-bottom: 6px;
        line-height: 1.5;
    }

    .review-text strong {
        font-weight: 600;
        color: #424770;
    }

    #rev-bill-section {
        grid-column: 1 / -1;
    }

    /* --- GRADIENT TOOLTIP --- */
    :root {
        --tooltip-bg: #ffffff;
        --accent-pink: #ff0080;
    }

    .has-tooltip {
        position: relative;
        display: inline-block;
    }

    .animated-tooltip {
        position: absolute;
        bottom: 145%;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        width: 260px;
        padding: 3px;
        border-radius: 11px;
        z-index: 100;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.3s ease;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }

    .animated-tooltip::before {
        content: '';
        position: absolute;
        inset: -50%;
        background: conic-gradient(var(--primary-blue),
                var(--success-green),
                var(--accent-pink),
                var(--primary-blue));
        z-index: 1;
    }

    .tooltip-inner {
        position: relative;
        background: var(--tooltip-bg);
        color: var(--text-dark);
        padding: 16px 20px;
        border-radius: 8px;
        font-size: 13px;
        line-height: 1.6;
        text-align: center;
        display: block;
        z-index: 2;
        white-space: normal;
    }

    .animated-tooltip::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        margin-left: -6px;
        width: 12px;
        height: 12px;
        background: var(--tooltip-bg);
        transform: rotate(45deg);
        z-index: 1;
    }

    .has-tooltip:hover .animated-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    /* --- PROGRAMMATIC TOOLTIP OVERRIDE --- */
    .has-tooltip.force-show-tooltip .animated-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    /* --- VAT SPECIFIC STYLES --- */
    .vat-valid {
        color: var(--success-green);
        font-weight: 600;
    }

    .vat-invalid {
        color: #dc2626;
        font-weight: 600;
    }

    .input-vat-valid {
        border-color: var(--success-green) !important;
        background-color: #f0fdf4 !important;
    }

    .input-vat-invalid {
        border-color: #dc2626 !important;
        background-color: #fef2f2 !important;
    }

    /* --- LOGO & MOBILE BUTTON --- */
    .form-logo-container {
        margin-bottom: 25px;
        text-align: center;
    }

    .form-logo {
        max-width: 220px;
        height: auto;
    }

    .mobile-only-btn {
        display: none !important;
        margin-top: 30px !important;
    }

    @media (max-width: 900px) {
        .mobile-only-btn {
            display: block !important;
        }

        #add-to-cart {
            display: none !important;
        }

        .form-logo-container {
            display: block;
        }
    }

    @media (min-width: 901px) {

        .form-logo-container,
        #add-another-book {
            display: none !important;
        }
    }
    
    /*---------MODIFICARI GABI*/
    @media (max-width: 900px) {
        .form-card, .summary-card
        {
            border:1px solid #c1c1c1;
        }
        
        input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="tel"],
    select {
        border: 2px solid #aeb3ba;
           }
    }

/* Issues Popup Floating Button */
.issues-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 7px 14px 0 rgba(60, 66, 87, 0.08), 0 3px 6px 0 rgba(0, 0, 0, 0.12);
    z-index: 998;
    transition: all 0.2s ease;
}

.issues-floating-btn:hover {
    border-color: #94a3b8;
    background-color: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Dark Overlay */
.issues-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.issues-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Centered Popup Card */
.issues-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    width: 90%;
    max-width: 450px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    z-index: 1003;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.issues-popup.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.issues-textarea,
.issues-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.issues-textarea {
    height: 120px;
    resize: none;
}

.issues-textarea:focus,
.issues-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.issues-send-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.issues-send-btn:hover {
    background-color: #2563eb;
}

/* Mobile Alignment (Top-Left) */
 @media (max-width: 600px) {
    .issues-floating-btn {
        bottom: auto;
        right: auto;
        top: 15px;
        left: 15px;
        padding: 8px 16px;
    }
}