/* ============================================================
   DA Platou Configurator — platou-configurator.css
   Design identic cu tema Dulce Artizanal
   ============================================================ */

/* ── Variabile (preluate din tema principală) ── */
.da-platou-configurator {
    --honey:    #c9893f;
    --honey-dk: #a36b28;
    --honey-lt: #e8c48a;
    --ink:      #2c1a0e;
    --ink-mid:  #5c3d28;
    --ink-soft: #8b6248;
    --bg:       #faf6f0;
    --warm:     #f4ede2;
    --paper:    #fffdf9;
    --sage:     #7d9b74;
    --red:      #c0392b;
    --border:   rgba(44,26,14,0.1);
    --shadow-s: 0 2px 12px rgba(44,26,14,0.08);
    --shadow-m: 0 6px 32px rgba(44,26,14,0.12);
    --radius:   12px;

    font-family: 'Nunito', sans-serif;
    margin: 32px 0 0;
    border-top: 2px solid var(--border);
    padding-top: 28px;
}

/* ── Header ── */
.da-cfg-header {
    margin-bottom: 24px;
}
.da-cfg-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 6px;
    line-height: 1.2;
}
.da-cfg-title em {
    font-style: italic;
    color: var(--honey);
}
.da-cfg-subtitle {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0;
}

/* ── Bara de progres greutate ── */
.da-cfg-progress-wrap {
    background: var(--warm);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 28px;
    border: 1px solid var(--border);
}
.da-cfg-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--ink-mid);
    margin-bottom: 10px;
    font-weight: 600;
}
.da-cfg-progress-bar {
    position: relative;
    height: 12px;
    background: #e0d4c8;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}
.da-cfg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--honey), var(--honey-dk));
    border-radius: 6px;
    transition: width .4s cubic-bezier(.4,0,.2,1), background .3s;
    max-width: 100%;
}
.da-cfg-progress-fill.over {
    background: linear-gradient(90deg, #e67e22, var(--red));
}
.da-cfg-progress-fill.exact {
    background: linear-gradient(90deg, var(--sage), #5a7f52);
}
.da-cfg-progress-status {
    font-size: 12px;
    color: var(--ink-soft);
    text-align: center;
    min-height: 18px;
    transition: color .2s;
}
.da-cfg-progress-status.good  { color: var(--sage); font-weight: 700; }
.da-cfg-progress-status.warn  { color: #e67e22;     font-weight: 700; }
.da-cfg-progress-status.over  { color: var(--red);  font-weight: 700; }

/* ── Categoria de produse ── */
.da-cfg-category {
    margin-bottom: 28px;
}
.da-cfg-cat-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--honey);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* ── Tabel produse ── */
.da-cfg-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

/* Header tabel */
.da-cfg-items-table thead tr {
    border-bottom: 2px solid var(--border);
}
.da-cfg-items-table thead th {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-align: left;
    white-space: nowrap;
}
.da-cfg-th-img     { width: 60px; padding-left: 0 !important; }
.da-cfg-th-name    { }
.da-cfg-th-price   { width: 130px; text-align: right !important; }
.da-cfg-th-qty     { width: 120px; text-align: center !important; }
.da-cfg-th-subtotal { width: 100px; text-align: right !important; }

/* Rând produs */
.da-cfg-item {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.da-cfg-item:last-child { border-bottom: none; }
.da-cfg-item:hover { background: var(--warm); }
.da-cfg-item.da-cfg-item--selected { background: #fffbf5; }
.da-cfg-item.da-cfg-item--oos { opacity: .5; pointer-events: none; }

.da-cfg-items-table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
}

/* Coloana imagine */
.da-cfg-td-img { padding-left: 0 !important; width: 60px; }
.da-cfg-item-img {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 7px;
    overflow: hidden;
    background: var(--warm);
    flex-shrink: 0;
}
.da-cfg-item-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.da-cfg-item:hover .da-cfg-item-img img { transform: scale(1.08); }
.da-cfg-item-oos {
    position: absolute; inset: 0;
    background: rgba(44,26,14,.55);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
}

/* Coloana nume */
.da-cfg-td-name { }
.da-cfg-item-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}

/* Coloana pret */
.da-cfg-td-price { text-align: right; white-space: nowrap; }
.da-cfg-item-price {
    font-weight: 700;
    color: var(--honey-dk);
    font-size: 14px;
}
.da-cfg-item-price .woocommerce-Price-amount { color: inherit; }
.da-cfg-item-price bdi { color: inherit; }
.da-cfg-item-unit {
    font-size: 11px;
    color: var(--ink-soft);
    white-space: nowrap;
}

/* Coloana cantitate */
.da-cfg-td-qty { text-align: center; }
.da-cfg-item-qty {
    display: inline-flex;
    align-items: center;
    background: var(--warm);
    border-radius: 7px;
    overflow: hidden;
    border: 1.5px solid var(--border);
    transition: border-color .2s;
}
.da-cfg-item.da-cfg-item--selected .da-cfg-item-qty {
    border-color: var(--honey);
}
.da-qty-btn {
    width: 30px; height: 32px;
    border: none;
    background: none;
    font-size: 18px;
    font-weight: 400;
    color: var(--ink);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.da-qty-btn:hover:not(:disabled) { background: var(--honey); color: #fff; }
.da-qty-btn:disabled { opacity: .3; cursor: not-allowed; }
.da-qty-input {
    width: 38px;
    border: none;
    background: none;
    text-align: center;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    padding: 0;
    -moz-appearance: textfield;
}
.da-qty-input::-webkit-inner-spin-button,
.da-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Coloana subtotal */
.da-cfg-td-subtotal { text-align: right; }
.da-cfg-item-subtotal {
    font-size: 13px;
    font-weight: 700;
    color: var(--honey-dk);
    white-space: nowrap;
    min-width: 60px;
    display: inline-block;
}

/* ── Empty state ── */
.da-cfg-empty {
    background: var(--warm);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.8;
}

/* ── Footer / Sumar + CTA ── */
.da-cfg-footer {
    margin-top: 32px;
    border-top: 2px solid var(--border);
    padding-top: 24px;
}
.da-cfg-summary {
    background: var(--warm);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.da-cfg-summary-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 12px;
}
.da-cfg-summary-lines {
    min-height: 24px;
}
.da-cfg-summary-empty {
    font-size: 13px;
    color: var(--ink-soft);
    font-style: italic;
}
.da-cfg-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    color: var(--ink-mid);
    padding: 4px 0;
    border-bottom: 1px dashed var(--border);
    gap: 12px;
}
.da-cfg-summary-line:last-child { border-bottom: none; }
.da-cfg-summary-line-name { flex: 1; }
.da-cfg-summary-line-qty  { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.da-cfg-summary-line-price { font-weight: 700; color: var(--honey-dk); white-space: nowrap; }
.da-cfg-summary-line-remove {
    background: none; border: none;
    color: #ccc; cursor: pointer;
    font-size: 14px; padding: 0 2px;
    transition: color .2s;
    flex-shrink: 0;
}
.da-cfg-summary-line-remove:hover { color: var(--red); }

.da-cfg-summary-sep {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}
.da-cfg-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--ink-mid);
    margin-bottom: 6px;
}
.da-cfg-summary-total {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 4px;
}
.da-cfg-summary-total .woocommerce-Price-amount { color: inherit; }
.da-cfg-summary-weight { font-size: 12px; }

/* Avertisment */
.da-cfg-warning {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.da-cfg-warning.warn {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #7c5d00;
}
.da-cfg-warning.over {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #7c1c1c;
}
.da-cfg-warning.good {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e5e31;
}

/* Buton principal Add to Cart */
.da-cfg-add-btn {
    width: 100%;
    background: var(--honey);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 16px 24px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background .2s, transform .15s, opacity .2s;
    box-shadow: 0 4px 20px rgba(201,137,63,.35);
    letter-spacing: 0.3px;
    margin-bottom: 12px;
}
.da-cfg-add-btn:hover:not(:disabled) {
    background: var(--honey-dk);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(201,137,63,.45);
}
.da-cfg-add-btn:disabled {
    background: #d4c0a8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: .7;
}
.da-cfg-add-btn.loading {
    opacity: .8;
    pointer-events: none;
}
.da-cfg-add-icon { font-size: 18px; flex-shrink: 0; }
.da-cfg-add-text { flex: 1; text-align: center; }
.da-cfg-add-price {
    font-size: 14px;
    background: rgba(255,255,255,.2);
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}

/* Notă de bas ── */
.da-cfg-note {
    font-size: 11px;
    color: var(--ink-soft);
    text-align: center;
    line-height: 1.6;
}

/* ── Success overlay după add to cart ── */
.da-platou-success {
    position: fixed;
    inset: 0;
    background: rgba(20,10,4,.6);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: daFadeIn .3s ease;
}
.da-platou-success-box {
    background: var(--paper);
    border-radius: 18px;
    padding: 40px 36px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(44,26,14,.25);
    animation: daSlideUp .35s ease;
}
.da-platou-success-icon {
    width: 72px; height: 72px;
    background: var(--sage);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
    box-shadow: 0 6px 20px rgba(125,155,116,.35);
}
.da-platou-success-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}
.da-platou-success-sub {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.65;
    margin-bottom: 24px;
}
.da-platou-success-price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--honey-dk);
    margin-bottom: 24px;
}
.da-platou-success-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.da-platou-success-btns a {
    flex: 1;
    padding: 13px 16px;
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all .2s;
}
.da-btn-checkout {
    background: var(--ink);
    color: #fff !important;
}
.da-btn-checkout:hover { background: var(--honey-dk); }
.da-btn-continue {
    background: var(--warm);
    color: var(--ink) !important;
    border: 1.5px solid var(--border);
}
.da-btn-continue:hover { border-color: var(--honey); }

@keyframes daFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes daSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ── Responsive ── */
@media (max-width: 640px) {
    /* Pe mobil: ascundem header tabel, transformam in "card rows" */
    .da-cfg-items-table thead { display: none; }
    .da-cfg-items-table,
    .da-cfg-items-table tbody,
    .da-cfg-items-table tr,
    .da-cfg-items-table td { display: block; width: 100%; }

    .da-cfg-item {
        display: grid;
        grid-template-columns: 56px 1fr auto;
        grid-template-rows: auto auto;
        gap: 6px 10px;
        padding: 10px 0;
        align-items: center;
    }
    .da-cfg-td-img {
        grid-row: 1 / 3;
        grid-column: 1;
        width: 56px;
        padding: 0 !important;
    }
    .da-cfg-item-img { width: 52px; height: 52px; }
    .da-cfg-td-name {
        grid-row: 1;
        grid-column: 2;
        padding: 0 !important;
    }
    .da-cfg-td-price {
        grid-row: 2;
        grid-column: 2;
        text-align: left !important;
        padding: 0 !important;
        font-size: 12px;
    }
    .da-cfg-td-qty {
        grid-row: 1 / 3;
        grid-column: 3;
        padding: 0 !important;
        text-align: right !important;
    }
    .da-cfg-td-subtotal { display: none; } /* Pe mobil subtotalul dispare — e in sumar */

    .da-platou-success-btns { flex-direction: column; }
}
