/*
 * viewcart.tpl — sm-vcart-* (benzersiz scope)
 * Ortak layout: configureproduct.css (.configure-product-orderform, #orderSummary …)
 */

#order-standard_cart.configure-product-orderform.viewcart-page {
    overflow-x: clip;
    max-width: 100%;
}

#order-standard_cart.configure-product-orderform.viewcart-page .cart-sidebar,
#order-standard_cart.configure-product-orderform.viewcart-page .sidebar-collapsed {
    display: none !important;
}

#order-standard_cart.configure-product-orderform.viewcart-page .configure-product-container > .row > .cart-sidebar {
    margin-bottom: 0;
}

#order-standard_cart.configure-product-orderform .configure-product-container > .row > .cart-sidebar,
#order-standard_cart.configure-product-orderform .configure-product-container > .row > .cart-body {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

#order-standard_cart.configure-product-orderform .configure-product-container > .row > .cart-sidebar {
    margin-bottom: 12px;
}

#order-standard_cart.configure-product-orderform .view-cart-summary-actions {
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
}

#order-standard_cart.configure-product-orderform .view-cart-summary-actions .express-checkout-buttons {
    margin-bottom: 12px;
}

#order-standard_cart.configure-product-orderform .view-cart-promo-ui-off {
    display: none !important;
}

/* ==========================================================================
   sm-vcart-lineitems — ürün / seçenek listesi
   ========================================================================== */

.sm-vcart-lineitems {
    max-width: 100%;
    min-width: 0;
}

.sm-vcart-lineitems .config-intro-title {
    margin-bottom: 0;
}

.sm-vcart-lineitems__body {
    min-width: 0;
    padding: 12px 14px 14px;
}

@media (min-width: 576px) {
    .sm-vcart-lineitems__body {
        padding: 14px 18px 18px;
    }
}

/* Tablo grid: info | qty? | price | action */
.sm-vcart-table {
    --sm-vcart-col-qty: 88px;
    --sm-vcart-col-price: minmax(120px, 150px);
    --sm-vcart-col-action: 40px;
    width: 100%;
    min-width: 0;
}

.sm-vcart-table:not(.sm-vcart-table--no-qty) .sm-vcart-table__head,
.sm-vcart-table:not(.sm-vcart-table--no-qty) .sm-vcart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sm-vcart-col-qty) var(--sm-vcart-col-price) var(--sm-vcart-col-action);
    gap: 12px 16px;
    align-items: start;
}

.sm-vcart-table--no-qty .sm-vcart-table__head,
.sm-vcart-table--no-qty .sm-vcart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sm-vcart-col-price) var(--sm-vcart-col-action);
    gap: 12px 16px;
    align-items: start;
}

.sm-vcart-table__head {
    padding: 0 0 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid #e9edf3;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.sm-vcart-table__col--price {
    text-align: right;
}

.sm-vcart-table__body {
    min-width: 0;
}

.sm-vcart-row {
    padding: 16px 0;
    border-bottom: 1px solid #eef1f5;
    min-width: 0;
}

.sm-vcart-table__body .sm-vcart-row:last-child {
    border-bottom: 0;
}

.sm-vcart-row--nested {
    padding-left: 12px;
    border-left: 3px solid #00c9b7;
    margin-left: 4px;
}

.sm-vcart-row--credit {
    padding-top: 8px;
    padding-bottom: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin: 0 0 8px;
    padding-left: 12px;
    padding-right: 12px;
    border-bottom: 0;
}

/* Ürün bilgisi */
.sm-vcart-row__info {
    min-width: 0;
}

.sm-vcart-row__headline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 4px;
}

.sm-vcart-row__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2a37;
    line-height: 1.35;
    word-break: break-word;
}

.sm-vcart-row__meta {
    margin: 0 0 4px;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

.sm-vcart-row__domain {
    margin: 0 0 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #03256c;
    word-break: break-word;
}

.sm-vcart-row__credit-msg {
    margin: 0;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.45;
}

/* Yapılandırma seçenekleri — pill */
.sm-vcart-row__opts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.sm-vcart-opt {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f0f4f8;
    border: 1px solid #e2e8f0;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.sm-vcart-opt__label {
    color: #64748b;
    font-weight: 500;
}

.sm-vcart-opt__label::after {
    content: ":";
}

.sm-vcart-opt__value {
    color: #1e293b;
    font-weight: 600;
    word-break: break-word;
}

/* Adet */
.sm-vcart-row__qty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
}

.sm-vcart-row__qty--empty {
    display: block;
    min-height: 1px;
}

.sm-vcart-qty-input {
    width: 100%;
    max-width: 72px;
    min-height: 36px;
    padding: 4px 6px;
    font-size: 0.9rem;
}

/* Fiyat */
.sm-vcart-row__price {
    text-align: right;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.sm-vcart-row__amount {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #03256c;
    line-height: 1.3;
    word-break: break-word;
}

.sm-vcart-row__amount--credit {
    color: #059669;
}

.sm-vcart-row__cycle {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.35;
}

.sm-vcart-row__extra {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.35;
}

.sm-vcart-row__renewal {
    margin-top: 2px;
}

.sm-vcart-row__renewal-price {
    font-weight: 600;
    color: #64748b;
}

.sm-vcart-row__dropdown {
    margin-top: 4px;
}

.sm-vcart-period-btn {
    font-size: 0.75rem;
}

/* Sil / düzenle */
.sm-vcart-row__remove {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
}

.sm-vcart-row__toolbar {
    display: none;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: center;
}

/* Butonlar */
.sm-vcart-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: none;
    color: #64748b;
    transition: color 0.15s ease;
}

.sm-vcart-btn:hover,
.sm-vcart-btn:focus {
    text-decoration: none;
    outline: none;
}

.sm-vcart-btn--edit {
    color: #03256c;
}

.sm-vcart-btn--edit:hover {
    color: #00c9b7;
}

.sm-vcart-btn--remove {
    color: #94a3b8;
}

.sm-vcart-btn--remove:hover {
    color: #dc2626;
}

.sm-vcart-btn--icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    justify-content: center;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px solid #e9edf3;
}

.sm-vcart-btn--icon:hover {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.sm-vcart-btn--update {
    padding: 4px 10px;
    border-radius: 6px;
    background: #03256c;
    color: #fff;
    font-size: 0.75rem;
}

.sm-vcart-btn--update:hover {
    background: #00c9b7;
    color: #fff;
}

.sm-vcart-clear {
    margin: 12px 0 0;
    text-align: right;
}

.sm-vcart-btn--clear {
    color: #64748b;
    font-size: 0.875rem;
}

.sm-vcart-btn--clear:hover {
    color: #dc2626;
}

.sm-vcart-empty {
    padding: 32px 16px;
    text-align: center;
    font-size: 0.95rem;
    color: #6b7280;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #e2e8f0;
}

/* Mobil — kart düzeni */
@media (max-width: 767.98px) {
    .sm-vcart-table__head {
        display: none;
    }

    .sm-vcart-table:not(.sm-vcart-table--no-qty) .sm-vcart-row,
    .sm-vcart-table--no-qty .sm-vcart-row {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        margin-bottom: 12px;
        border: 1px solid #e9edf3;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(3, 37, 108, 0.04);
    }

    .sm-vcart-table__body .sm-vcart-row:last-child {
        margin-bottom: 0;
    }

    .sm-vcart-row--nested {
        margin-left: 0;
        border-left: none;
        border-top: 3px solid #00c9b7;
        padding-left: 16px;
    }

    .sm-vcart-row--credit {
        margin-bottom: 12px;
    }

    .sm-vcart-row__toolbar {
        display: flex;
    }

    .sm-vcart-row__remove {
        display: none;
    }

    .sm-vcart-row__qty {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        padding-top: 8px;
        border-top: 1px solid #f0f2f5;
    }

    .sm-vcart-row__qty--empty {
        display: none;
    }

    .sm-vcart-row__price {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
        padding-top: 10px;
        border-top: 1px solid #f0f2f5;
        text-align: right;
    }

    .sm-vcart-row__amount {
        font-size: 1.125rem;
    }

    .sm-vcart-row__dropdown {
        width: 100%;
    }

    .sm-vcart-clear {
        text-align: center;
    }
}

@media (max-width: 991.98px) {
    #order-standard_cart.configure-product-orderform #scrollingPanelContainer.secondary-cart-sidebar {
        margin-top: 20px;
    }

    #order-standard_cart.configure-product-orderform .view-cart-summary-actions .btn-checkout,
    #order-standard_cart.configure-product-orderform .view-cart-summary-actions .btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #order-standard_cart.configure-product-orderform .view-cart-summary-actions .text-right {
        text-align: center !important;
    }
}

@media (max-width: 575.98px) {
    #order-standard_cart.configure-product-orderform .configure-product-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .sm-vcart-lineitems__body {
        padding: 10px 12px 12px;
    }

    .sm-vcart-row__title {
        font-size: 1rem;
    }

    .sm-vcart-opt {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}
