﻿/* ===============================
   WRAPPER
=============================== */

.gfcp-wrapper {
    margin-top: 18px;
    font-family: inherit;
    --gfcp-primary: #5b3df5;
    --gfcp-primary-soft: #f5f3ff;
    --gfcp-text: #0f172a;
    --gfcp-muted: #64748b;
    --gfcp-border: #dbe2f2;
    --gfcp-success: #16a34a;
    --gfcp-danger: #ef4444;
    --gfcp-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
    padding-bottom: 120px;
}

.gfcp-form {
    background:
        radial-gradient(circle at top right, rgba(91, 61, 245, 0.08), transparent 28%),
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.07), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(219, 226, 242, 0.9);
    box-shadow: var(--gfcp-shadow);
}

.gfcp-wrapper h4 {
    margin: 18px 0 12px;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.15;
    color: var(--gfcp-text);
}

.gfcp-wrapper--out-of-stock {
    padding-bottom: 0;
}

.gfcp-stock-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff5f5, #fee2e2);
    border: 1px solid #fca5a5;
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.10);
    color: #991b1b;
}

.gfcp-stock-alert strong {
    font-size: 18px;
    font-weight: 900;
}

.gfcp-stock-alert span {
    font-size: 14px;
    font-weight: 800;
    color: #7f1d1d;
}

/* ===============================
   FIELD BLOCKS
=============================== */

.gfcp-field {
    position: relative;
    margin-bottom: 12px;
    padding: 12px 12px 10px;
    border: 2px solid var(--gfcp-border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.gfcp-field:hover,
.gfcp-field:focus-within {
    transform: translateY(-1px);
    border-color: rgba(91, 61, 245, 0.45);
    box-shadow: 0 12px 28px rgba(91, 61, 245, 0.08);
    background: linear-gradient(180deg, #ffffff, #f7f4ff);
}

.gfcp-field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--gfcp-text);
}

.gfcp-field input,
.gfcp-field select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(226, 232, 240, 0.95);
    background: #ffffff;
    font-size: 15px;
    color: var(--gfcp-text);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.gfcp-field input:focus,
.gfcp-field select:focus {
    outline: none;
    border-color: var(--gfcp-primary);
    box-shadow: 0 0 0 4px rgba(91, 61, 245, 0.10);
}

.gfcp-field input::placeholder {
    color: #94a3b8;
    font-size: 14px;
}

.gfcp-field input[name="cod_phone"] {
    direction: rtl;
    text-align: right;
}

.gfcp-field label::after {
    content: "";
}

.gfcp-field label:has(+ input[required])::after {
    content: " *";
    color: var(--gfcp-danger);
    font-weight: 700;
}

.gfcp-color-field {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.gfcp-color-field:hover,
.gfcp-color-field:focus-within {
    transform: none;
    border-color: transparent;
    box-shadow: none;
    background: transparent;
}

.gfcp-color-bundle {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(219, 226, 242, 0.8);
}

.gfcp-color-bundle[hidden] {
    display: none !important;
}

.gfcp-color-row {
    padding: 14px;
    border: 1.5px solid rgba(219, 226, 242, 0.95);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.gfcp-color-row[hidden] {
    display: none !important;
}

.gfcp-color-row__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    text-align: right;
}

.gfcp-color-row__product {
    color: var(--gfcp-text);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.gfcp-color-row__label {
    color: var(--gfcp-muted);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.1;
}

.gfcp-color-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.gfcp-color-option {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 10px 12px;
    width: auto;
    height: auto;
    min-height: 50px;
    border: 1.5px solid rgba(219, 226, 242, 0.95);
    border-radius: 14px;
    background: #ffffff;
    color: var(--gfcp-text);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.gfcp-color-option:hover {
    transform: translateY(-1px);
    border-color: rgba(91, 61, 245, 0.35);
    box-shadow: 0 10px 22px rgba(91, 61, 245, 0.08);
}

.gfcp-color-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gfcp-color-option__swatch {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 999px;
    background: var(--gfcp-color);
    border: 2px solid #ffffff;
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.12),
        0 8px 16px rgba(15, 23, 42, 0.10);
}

.gfcp-color-option__name {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--gfcp-text);
}

.gfcp-color-option:has(input:checked) {
    border-color: var(--gfcp-primary);
    background: linear-gradient(180deg, #ffffff, var(--gfcp-primary-soft));
    box-shadow:
        0 10px 22px rgba(91, 61, 245, 0.12);
}

.gfcp-color-option:has(input:checked)::after {
    content: "";
    width: 9px;
    height: 9px;
    margin-inline-start: auto;
    border-radius: 999px;
    background: var(--gfcp-primary);
    box-shadow: 0 0 0 4px rgba(91, 61, 245, 0.12);
}

@media (max-width: 768px) {
    .gfcp-color-row {
        padding: 14px 12px;
    }

    .gfcp-color-row__product {
        font-size: 15px;
    }

    .gfcp-color-row__label {
        font-size: 13px;
    }

    .gfcp-color-option {
        min-height: 48px;
    }
}

/* ===============================
   OFFERS
=============================== */

.gfcp-offers {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gfcp-offer {
    position: relative;
    border-radius: 20px;
    padding: 18px 16px;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, background 0.28s ease;
    cursor: pointer;
    overflow: visible;
}

.gfcp-offer:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.gfcp-offer.active {
    border-color: var(--gfcp-primary);
    background: linear-gradient(180deg, #ffffff 0%, var(--gfcp-primary-soft) 100%);
    box-shadow: 0 16px 32px rgba(91, 61, 245, 0.14);
}

.offer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.offer-price {
    order: 2;
    direction: ltr;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-inline-start: auto;
    font-size: 21px;
    font-weight: 900;
    color: var(--gfcp-text);
    letter-spacing: -0.02em;
    text-align: left;
}

.old-price {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
}

.new-price {
    font-size: 21px;
    font-weight: 900;
    color: var(--gfcp-text);
    letter-spacing: -0.03em;
}

.offer-title {
    order: 1;
    flex: 1 1 auto;
    font-size: 19px;
    font-weight: 900;
    color: var(--gfcp-text);
    line-height: 1.2;
    text-align: right;
}

.gfcp-offer.active .offer-title {
    color: var(--gfcp-primary);
}

.offer-desc {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--gfcp-muted);
}

.gfcp-custom-qty {
    display: flex !important;
    align-items: center;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 14px 0 0 !important;
    padding: 10px 12px;
    border: 1.5px solid rgba(219, 226, 242, 0.95);
    border-radius: 14px;
    background: #ffffff;
    color: var(--gfcp-text);
    font-size: 14px;
    font-weight: 900;
}

.gfcp-custom-qty input {
    width: 72px;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1.5px solid rgba(91, 61, 245, 0.35);
    background: #ffffff;
    color: var(--gfcp-text);
    font-size: 17px;
    font-weight: 900;
    text-align: center;
}

.gfcp-custom-qty__control {
    direction: ltr;
    display: inline-grid;
    grid-template-columns: 42px 72px 42px;
    align-items: center;
    gap: 8px;
}

.gfcp-custom-qty__step {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: linear-gradient(90deg, #4f46e5, #7c3aed) !important;
    color: #ffffff !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(91, 61, 245, 0.16);
}

.gfcp-custom-qty__step:hover {
    opacity: 0.94;
}

.gfcp-custom-qty input:focus {
    outline: none;
    border-color: var(--gfcp-primary);
    box-shadow: 0 0 0 4px rgba(91, 61, 245, 0.10);
}

.badge {
    position: absolute;
    top: -10px;
    left: 12px;
    background: var(--gfcp-success);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.22);
}

.gfcp-offer[data-qty="2"]::after {
    content: "\0627\0644\0627\0643\062B\0631 \0637\0644\0628\0627";
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    color: white;
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.20);
}

/* ===============================
   SUMMARY
=============================== */

.gfcp-price-color-notice {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin: -6px 18px 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff, #f5f3ff);
    border: 1px solid rgba(91, 61, 245, 0.16);
    box-shadow: 0 10px 22px rgba(91, 61, 245, 0.06);
    color: var(--gfcp-text);
}

.gfcp-price-color-notice__text {
    color: var(--gfcp-muted);
    font-size: 14px;
    font-weight: 800;
}

.gfcp-price-color-notice strong {
    color: var(--gfcp-primary);
    font-size: 15px;
    font-weight: 900;
}

.gfcp-price-color-notice__swatches {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gfcp-price-color-notice__swatch {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--gfcp-color);
    border: 2px solid #ffffff;
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.12),
        0 6px 14px rgba(15, 23, 42, 0.12);
}

.gfcp-summary {
    margin-top: 16px;
    padding: 16px;
    border: 2px solid var(--gfcp-primary);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,243,255,0.98));
    box-shadow: 0 12px 28px rgba(91, 61, 245, 0.08);
}

.gfcp-summary .row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--gfcp-text);
}

.gfcp-summary hr {
    margin: 10px 0 12px;
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.55), transparent);
}

.gfcp-summary .total {
    font-weight: 900;
    font-size: 18px;
}

/* ===============================
   BUTTON
=============================== */

button.gfcp-submit,
.gfcp-submit,
.gfcp-form button.gfcp-submit {
    display: block !important;
    width: 100% !important;
    margin-top: 18px;
    padding: 14px !important;
    border: none !important;
    border-radius: 16px !important;
    background: linear-gradient(90deg, #4f46e5, #7c3aed) !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    text-align: center !important;
    box-shadow: 0 14px 26px rgba(91, 61, 245, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

button.gfcp-submit:hover,
.gfcp-submit:hover,
.gfcp-form button.gfcp-submit:hover {
    transform: translateY(-2px);
    opacity: 0.96;
    box-shadow: 0 18px 32px rgba(91, 61, 245, 0.26);
}

button.gfcp-submit:disabled,
.gfcp-submit--disabled,
.gfcp-form button.gfcp-submit:disabled {
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: linear-gradient(180deg, #e2e8f0, #cbd5e1) !important;
    color: #64748b !important;
    box-shadow: none !important;
    opacity: 0.82;
    transform: none !important;
}

.gfcp-sticky-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 9999;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(219, 226, 242, 0.95);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.gfcp-sticky-bar__call,
.gfcp-sticky-bar__buy {
    min-height: 50px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
}

.gfcp-sticky-bar__call {
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.gfcp-sticky-bar__icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.33 1.79.63 2.64a2 2 0 0 1-.45 2.11L8 9.91a16 16 0 0 0 6.09 6.09l1.44-1.29a2 2 0 0 1 2.11-.45c.85.3 1.74.51 2.64.63A2 2 0 0 1 22 16.92Z'/%3E%3C/svg%3E");
}

.gfcp-sticky-bar__buy {
    border: none;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    color: #ffffff !important;
    box-shadow: 0 12px 24px rgba(91, 61, 245, 0.16);
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: 0;
    font-family: inherit;
    text-shadow: none;
}

.gfcp-sticky-bar__buy:hover {
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
}

@media (min-width: 1025px) {
    .gfcp-sticky-bar {
        left: 50%;
        right: auto;
        transform: translateX(50%);
        width: min(640px, calc(100vw - 96px));
        grid-template-columns: 64px minmax(0, 1fr);
    }
}

body.single-product {
    padding-bottom: 120px;
}

@media (max-width: 768px) {
    .gfcp-submit {
        display: none !important;
    }

    .gfcp-form {
        padding: 16px;
        border-radius: 20px;
    }

    .gfcp-wrapper h4 {
        font-size: 18px;
    }

    .gfcp-field {
        padding: 12px 10px 10px;
        border-radius: 16px;
    }

    .gfcp-offer {
        padding: 16px 14px;
        border-radius: 18px;
    }

    .offer-top {
        gap: 12px;
    }

    .offer-price,
    .new-price {
        font-size: 20px;
    }

    .old-price {
        font-size: 13px;
    }

    .offer-desc {
        font-size: 13px;
    }
    }

    .gfcp-summary {
        padding: 14px;
        border-radius: 18px;
    }

    .gfcp-wrapper {
        padding-bottom: 104px;
    }

    .gfcp-sticky-bar {
        left: 10px;
        right: 10px;
        bottom: 10px;
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 8px;
        padding: 8px;
        border-radius: 18px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(calc(100% + 18px));
        transition: opacity 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
    }

    .gfcp-sticky-bar.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .gfcp-sticky-bar__call,
    .gfcp-sticky-bar__buy {
        min-height: 46px;
        border-radius: 12px;
        font-size: 15px;
    }

    body.single-product {
        padding-bottom: 104px;
    }
}

