/* ===========================
   FYRETECH - Cotação Page
   Light Theme
   =========================== */

/* --- Light theme variables --- */
.cotacao-page-header,
.cotacao-section {
    --cotacao-bg: #f5f5f5;
    --cotacao-surface: #ffffff;
    --cotacao-border: rgba(0, 0, 0, 0.08);
    --cotacao-text: #333333;
    --cotacao-text-light: #666666;
    --cotacao-text-muted: #999999;
    --cotacao-heading: #111111;
}

/* ===========================
   PAGE HEADER (sem banner)
   =========================== */
.cotacao-page-header {
    padding-top: calc(var(--header-height, 80px) + 32px);
    padding-bottom: 28px;
    background: var(--color-bg);
}

/* Breadcrumb */
.cotacao-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
}

.cotacao-breadcrumb a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.cotacao-breadcrumb a:hover {
    color: var(--color-primary-light);
}

.cotacao-breadcrumb svg {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.cotacao-breadcrumb span {
    color: var(--color-text);
}

.cotacao-page-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #ffffff;
}

/* ===========================
   COTACAO SECTION
   =========================== */
.cotacao-section {
    padding: 64px 0 80px;
    background: var(--cotacao-bg);
    overflow-x: hidden;
}

/* --- Toolbar --- */
.cotacao-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.cotacao-toolbar.hidden {
    display: none;
}

.cotacao-count {
    font-size: 15px;
    font-weight: 600;
    color: var(--cotacao-text);
}

.cotacao-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--cotacao-surface);
    border: 1px solid var(--cotacao-border);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--cotacao-text-light);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cotacao-clear-btn:hover {
    color: var(--color-primary);
    border-color: rgba(200, 16, 46, 0.2);
    background: rgba(200, 16, 46, 0.03);
}

/* ===========================
   LAYOUT (list + sidebar)
   =========================== */
.cotacao-layout {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 32px;
    align-items: start;
    min-width: 0;
}

/* --- List --- */
.cotacao-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* --- Item Card (horizontal — desktop) --- */
.cotacao-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--cotacao-surface);
    border: 1px solid var(--cotacao-border);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.cotacao-item:hover {
    border-color: rgba(200, 16, 46, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.cotacao-item-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    background: var(--cotacao-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

.cotacao-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cotacao-item-info {
    flex: 1;
    min-width: 0;
}

.cotacao-item-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.cotacao-item-name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--cotacao-heading);
    line-height: 1.3;
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.cotacao-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.cotacao-item-view {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--cotacao-text-light);
    background: var(--cotacao-bg);
    border: 1px solid var(--cotacao-border);
    border-radius: 8px;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.cotacao-item-view:hover {
    color: var(--color-primary);
    border-color: rgba(200, 16, 46, 0.2);
}

.cotacao-item-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cotacao-bg);
    border: 1px solid var(--cotacao-border);
    color: var(--cotacao-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cotacao-item-remove:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.25);
}

/* ===========================
   QUANTITY CONTROLS
   =========================== */
.cotacao-item-qty {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.cotacao-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--cotacao-bg);
    border: 1px solid var(--cotacao-border);
    color: var(--cotacao-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cotacao-qty-btn:hover {
    border-color: rgba(200, 16, 46, 0.25);
    color: var(--color-primary);
    background: rgba(200, 16, 46, 0.03);
}

.cotacao-qty-input {
    width: 44px;
    height: 32px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--cotacao-heading);
    background: var(--cotacao-surface);
    border: 1px solid var(--cotacao-border);
    border-radius: 8px;
    -moz-appearance: textfield;
    outline: none;
    transition: border-color var(--transition-fast);
}

.cotacao-qty-input::-webkit-outer-spin-button,
.cotacao-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cotacao-qty-input:focus {
    border-color: var(--color-primary);
}

/* ===========================
   SUMMARY SIDEBAR
   =========================== */
.cotacao-summary {
    background: var(--cotacao-surface);
    border: 1px solid var(--cotacao-border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 100px;
    min-width: 0;
    overflow: hidden;
}

.cotacao-summary-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--cotacao-heading);
    margin: 0 0 8px;
}

.cotacao-summary-count {
    font-size: 14px;
    color: var(--cotacao-text-light);
    margin-bottom: 20px;
}

.cotacao-summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.cotacao-summary-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: var(--cotacao-text);
    padding: 8px 12px;
    background: var(--cotacao-bg);
    border-radius: 8px;
    line-height: 1.4;
}

.cotacao-summary-list li span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cotacao-summary-list li strong {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--cotacao-heading);
}

.cotacao-summary-divider {
    height: 1px;
    background: var(--cotacao-border);
    margin-bottom: 24px;
}

/* ===========================
   CHECKOUT FORM
   =========================== */
.cotacao-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cotacao-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cotacao-form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--cotacao-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cotacao-form-group input,
.cotacao-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--cotacao-text);
    background: var(--cotacao-bg);
    border: 1px solid var(--cotacao-border);
    border-radius: 10px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
}

.cotacao-form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.cotacao-form-group input:focus,
.cotacao-form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.08);
}

.cotacao-form-group input::placeholder,
.cotacao-form-group textarea::placeholder {
    color: var(--cotacao-text-muted);
}

/* Form Row (side by side) */
.cotacao-form-row {
    display: flex;
    gap: 12px;
}

.cotacao-form-flex {
    flex: 1;
    min-width: 0;
}

.cotacao-form-small {
    width: 80px;
    flex-shrink: 0;
}

/* Form Divider */
.cotacao-form-divider {
    height: 1px;
    background: var(--cotacao-border);
    margin: 4px 0;
}

/* Form Error */
.cotacao-form-error {
    display: none;
    font-size: 13px;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.06);
    border: 1px solid rgba(220, 53, 69, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
    line-height: 1.4;
}

/* Submit Button */
.cotacao-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: var(--color-primary);
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 16px rgba(200, 16, 46, 0.25);
}

.cotacao-submit-btn:hover {
    background: #a80d26;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.3);
}

.cotacao-submit-btn.loading {
    opacity: 0.8;
    pointer-events: none;
}

.cotacao-submit-btn svg {
    flex-shrink: 0;
}

/* Spinner */
.cotacao-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: cotacao-spin 0.6s linear infinite;
}

@keyframes cotacao-spin {
    to { transform: rotate(360deg); }
}

/* ===========================
   SUCCESS STATE
   =========================== */
.cotacao-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
}

.cotacao-success.visible {
    display: flex;
}

.cotacao-success svg {
    color: #25D366;
    margin-bottom: 24px;
}

.cotacao-success-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--cotacao-heading);
    margin: 0 0 8px;
}

.cotacao-success-id {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 16px;
}

.cotacao-success-text {
    font-size: 15px;
    color: var(--cotacao-text-light);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 0 32px;
}

/* ===========================
   EMPTY STATE
   =========================== */
.cotacao-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
}

.cotacao-empty.visible {
    display: flex;
}

.cotacao-empty svg {
    color: var(--cotacao-text-muted);
    opacity: 0.25;
    margin-bottom: 24px;
}

.cotacao-empty-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--cotacao-heading);
    margin-bottom: 12px;
}

.cotacao-empty-text {
    font-size: 15px;
    color: var(--cotacao-text-light);
    line-height: 1.6;
    max-width: 420px;
    margin-bottom: 32px;
}

.cotacao-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--color-primary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(200, 16, 46, 0.25);
}

.cotacao-empty-cta:hover {
    background: #a80d26;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200, 16, 46, 0.3);
}

/* ===========================
   RESPONSIVE
   =========================== */

/* Tablet — sidebar goes below */
@media (max-width: 991px) {

    .cotacao-section {
        padding: 48px 0 64px;
    }

    .cotacao-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cotacao-summary {
        position: static;
    }
}

/* Mobile — grid 2 colunas + cards verticais */
@media (max-width: 767px) {

    .cotacao-page-header {
        padding-top: calc(var(--header-height, 70px) + 20px);
        padding-bottom: 20px;
    }

    .cotacao-page-title {
        font-size: 24px;
    }

    .cotacao-breadcrumb {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .cotacao-section {
        padding: 24px 0 48px;
    }

    /* Toolbar */
    .cotacao-toolbar {
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 20px;
    }

    .cotacao-count {
        font-size: 13px;
    }

    .cotacao-clear-btn {
        font-size: 12px;
        padding: 8px 14px;
    }

    /* Switch to 2-column grid with vertical cards */
    .cotacao-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .cotacao-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 14px 10px 12px;
        gap: 10px;
        border-radius: 12px;
    }

    .cotacao-item-image {
        width: 110px;
        height: 110px;
        max-width: 100%;
        padding: 6px;
        border-radius: 10px;
    }

    .cotacao-item-info {
        width: 100%;
    }

    .cotacao-item-tag {
        font-size: 9px;
    }

    .cotacao-item-name {
        font-size: 12px;
    }

    .cotacao-item-qty {
        justify-content: center;
    }

    .cotacao-qty-btn {
        width: 28px;
        height: 28px;
    }

    .cotacao-qty-input {
        width: 38px;
        height: 28px;
        font-size: 13px;
    }

    .cotacao-item-actions {
        justify-content: center;
        width: 100%;
        gap: 8px;
    }

    .cotacao-item-view {
        padding: 5px 10px;
        font-size: 10px;
    }

    .cotacao-item-remove {
        width: 30px;
        height: 30px;
    }

    /* Summary */
    .cotacao-summary {
        padding: 20px;
        border-radius: 14px;
    }

    .cotacao-summary-title {
        font-size: 16px;
    }

    .cotacao-summary-count {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .cotacao-summary-list {
        max-height: 160px;
        margin-bottom: 20px;
    }

    .cotacao-summary-list li {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* Form */
    .cotacao-form {
        gap: 14px;
    }

    .cotacao-form-row {
        flex-direction: column;
        gap: 14px;
    }

    .cotacao-form-small {
        width: 100%;
    }

    .cotacao-form-group label {
        font-size: 11px;
    }

    .cotacao-form-group input,
    .cotacao-form-group textarea {
        font-size: 16px;
        padding: 12px 14px;
    }

    .cotacao-submit-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    /* Empty / Success */
    .cotacao-empty,
    .cotacao-success {
        padding: 48px 16px;
    }

    .cotacao-empty svg {
        width: 56px;
        height: 56px;
    }

    .cotacao-empty-title {
        font-size: 20px;
    }

    .cotacao-empty-text {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .cotacao-empty-cta {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

    .cotacao-success svg {
        width: 56px;
        height: 56px;
    }

    .cotacao-success-title {
        font-size: 22px;
    }

    .cotacao-success-id {
        font-size: 14px;
    }

    .cotacao-success-text {
        font-size: 13px;
    }
}

