/* ============================================================
   Attiroof — Cere Ofertă  |  style.css  v1.0.0
   ============================================================ */

/* ---------- Buton flotant ---------- */
#attiroof-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9990;
    width: 80px;
    height: 80px;
    padding: 8px;
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.35;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease;
    /* reset orice stil global pe <button> */
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

#attiroof-btn:hover,
#attiroof-btn:focus-visible {
    background: #000000;
    color: #ffffff;
}

/* ---------- Overlay ---------- */
#attiroof-overlay {
    position: fixed;
    inset: 0;
    z-index: 9993;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#attiroof-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ---------- Panou lateral ---------- */
#attiroof-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 9996;
    width: 430px;
    max-width: 100%;
    background: #ffffff;
    box-shadow: -6px 0 32px rgba(0, 0, 0, 0.14);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

#attiroof-panel.is-open {
    transform: translateX(0);
}

/* ---------- Interior panou ---------- */
#attiroof-panel-inner {
    padding: 0 28px 48px;
    min-height: 100%;
    box-sizing: border-box;
    position: relative;
}

/* ---------- Buton închidere ---------- */
#attiroof-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #d0d0d0;
    cursor: pointer;
    color: #444;
    padding: 0;
    transition: background 0.15s, border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

#attiroof-close:hover,
#attiroof-close:focus-visible {
    background: #f0f0f0;
    border-color: #888;
}

/* ---------- Header panou ---------- */
.attiroof-panel-head {
    padding: 28px 40px 24px 0;
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 24px;
}

.attiroof-panel-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #111111;
    line-height: 1.3;
}

.attiroof-panel-subtitle {
    margin: 0;
    font-size: 13px;
    color: #666666;
    line-height: 1.5;
}

/* ---------- Etichetă secțiune ---------- */
.attiroof-section-label {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.attiroof-section-label span {
    color: #c00;
}

/* ---------- Grid produse ---------- */
.attiroof-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 26px;
}

/* ---------- Card produs ---------- */
.attiroof-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 8px 12px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.18s ease, background 0.18s ease;
    text-align: center;
}

.attiroof-product-card:hover {
    border-color: #999;
}

/* Checkbox ascuns */
.attiroof-product-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Stare bifată (toggle via JS cu clasa .is-checked) */
.attiroof-product-card.is-checked {
    border-color: #000000;
    background: #f6f6f6;
}

/* Iconița bifă */
.attiroof-check-icon {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: #000000;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attiroof-product-card.is-checked .attiroof-check-icon {
    display: flex;
}

/* Zona imaginii */
.attiroof-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f0f0f0;
    border: 1px solid #e4e4e4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.attiroof-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder imagine */
.attiroof-img-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Numele produsului */
.attiroof-card-name {
    font-size: 10.5px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ---------- Câmpuri formular ---------- */
.attiroof-field {
    margin-bottom: 18px;
}

.attiroof-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.attiroof-field label span {
    color: #c00;
    font-weight: 400;
}

.attiroof-field input[type="text"],
.attiroof-field input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c8c8c8;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: #111;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.18s ease;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

.attiroof-field input[type="text"]:focus,
.attiroof-field input[type="tel"]:focus {
    border-color: #000;
}

/* ---------- Stepper cantitate ---------- */
.attiroof-stepper {
    display: flex;
    align-items: stretch;
    height: 44px;
}

.attiroof-step-btn {
    width: 44px;
    flex-shrink: 0;
    border: 1px solid #c8c8c8;
    background: #f5f5f5;
    font-size: 22px;
    font-weight: 300;
    cursor: pointer;
    color: #333;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

.attiroof-step-btn:hover {
    background: #e0e0e0;
}

.attiroof-step-btn:active {
    background: #ccc;
}

.attiroof-qty-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #c8c8c8;
    border-bottom: 1px solid #c8c8c8;
    gap: 4px;
}

.attiroof-qty-display input[type="number"] {
    width: 64px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    text-align: right;
    outline: none;
    padding: 0;
    -moz-appearance: textfield;
    cursor: default;
}

.attiroof-qty-display input[type="number"]::-webkit-outer-spin-button,
.attiroof-qty-display input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.attiroof-qty-unit {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.attiroof-hint {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #888;
}

/* ---------- Mesaje status ---------- */
#attiroof-msg {
    min-height: 0;
    margin-bottom: 16px;
    font-size: 13.5px;
    line-height: 1.5;
}

#attiroof-msg.is-success {
    padding: 10px 14px;
    background: #eaf7ea;
    border-left: 3px solid #2d8a2d;
    color: #1e5e1e;
}

#attiroof-msg.is-error {
    padding: 10px 14px;
    background: #fdf0f0;
    border-left: 3px solid #c0392b;
    color: #7a1515;
}

/* ---------- Buton Submit ---------- */
#attiroof-submit {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #000000;
    color: #ffffff;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

#attiroof-submit:hover {
    background: #222222;
}

#attiroof-submit:disabled {
    background: #888888;
    cursor: not-allowed;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    #attiroof-panel {
        width: 100%;
    }

    #attiroof-panel-inner {
        padding: 0 18px 48px;
    }

    #attiroof-btn {
        bottom: 18px;
        right: 18px;
        width: 70px;
        height: 70px;
        font-size: 11px;
    }
}
