/* ============================================================
   CART.CSS – Warenkorb-Styles für Staendi
   ============================================================ */

/* ===== Navbar Cart Icon ===== */
.cart-icon-btn {
    position: relative;
    color: inherit;
    font-size: 1.25rem;
    padding: 0.4rem 0.5rem;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    transition: color 0.2s ease;
}
.cart-icon-btn:hover {
    color: #007bff;
}
.cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    font-size: 0.6rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    pointer-events: none;
}

/* ===== Warenkorb-Seite (cart.php) ===== */
.cart-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Produkt-Tabelle */
#cart-items-tbody tr {
    vertical-align: middle;
}
.cart-product-img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.cart-product-name {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    margin-bottom: 2px;
}
.cart-product-variant {
    font-size: 0.82rem;
    color: #888;
}
.cart-product-price {
    color: #555;
    font-size: 0.95rem;
}

/* Mengensteuerung */
.qty-control {
    display: flex;
    align-items: center;
    gap: 4px;
}
.qty-control .btn {
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

/* Löschen-Button */
.cart-remove-btn {
    color: #ccc;
    background: none;
    border: none;
    font-size: 1.1rem;
    padding: 4px 8px;
    cursor: pointer;
    transition: color 0.2s;
    border-radius: 4px;
}
.cart-remove-btn:hover {
    color: #e74c3c;
    background: #fff0f0;
}

/* ===== Bestellübersicht (Order Summary) ===== */
.order-summary-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.order-summary-card .card-body {
    padding: 1.75rem;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}
.summary-row.total-row {
    font-size: 1.2rem;
    font-weight: 700;
    padding-top: 0.5rem;
    margin-top: 0.3rem;
    border-top: 2px solid #eee;
    margin-bottom: 1.2rem;
}
.summary-label {
    color: #666;
}
.discount-row {
    color: #28a745;
}
.free-shipping-label {
    color: #28a745;
    font-weight: 600;
}

/* Lieferinfo-Karte */
.info-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    font-size: 0.9rem;
}
.info-card .info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #555;
}
.info-card .info-row:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}
.info-card .info-icon {
    color: #007bff;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* ===== Coupon ===== */
.coupon-card {
    border: 1px dashed #dee2e6;
    border-radius: 12px;
    background: #fafafa;
}
.coupon-card .card-body {
    padding: 1.25rem 1.5rem;
}
#cart-coupon-msg {
    font-size: 0.88rem;
    min-height: 1.2rem;
}

/* ===== Leerer Warenkorb ===== */
#cart-empty {
    padding: 5rem 0;
}
#cart-empty .empty-icon {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}
#cart-empty h3 {
    color: #aaa;
    font-weight: 400;
}

/* ===== Varianten-Modal (Dynamisch & Responsiv) ===== */
#variant-modal .modal-dialog {
    max-width: 520px;
    width: 92%;
    margin: 1.75rem auto;
    transition: transform 0.3s ease-out;
}
#variant-modal .modal-content {
    border-radius: 18px;
    border: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}
#variant-modal .modal-header {
    border-bottom: 1px solid #edf0f2;
    padding: 1.15rem 1.4rem;
    background: #ffffff;
}
#variant-modal .modal-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: #2c3e50;
}
#variant-modal .modal-body {
    padding: 1.25rem 1.4rem;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#variant-modal .modal-footer {
    border-top: 1px solid #edf0f2;
    padding: 0.9rem 1.4rem;
    background: #fafbfc;
}
.modal-product-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #edf0f2;
}
#atc-product-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0;
}
#atc-product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #007bff;
    white-space: nowrap;
    margin-left: 12px;
}
@keyframes pricePop {
    0% { transform: scale(1); }
    40% { transform: scale(1.12); color: #28a745; }
    100% { transform: scale(1); }
}
.price-pop {
    animation: pricePop 0.25s ease-out;
}

@media (max-width: 576px) {
    #variant-modal .modal-dialog {
        width: 95%;
        margin: 0.75rem auto;
    }
    #variant-modal .modal-body {
        padding: 1rem;
        max-height: 80vh;
    }
    #variant-modal .modal-header,
    #variant-modal .modal-footer {
        padding: 0.85rem 1rem;
    }
}

/* Klickbare Produktkarte auf der Hauptseite */
.pricing-card-clickable {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pricing-card-clickable:hover {
    cursor: pointer;
}
.pricing-card-clickable button {
    cursor: pointer;
}
.color-section-block {
    background: #fbfbfc;
    border: 1px solid #edf0f2;
    border-radius: 12px;
    padding: 10px 12px 6px;
}
.color-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f0f2f5;
}
.color-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
}

/* Gleichmäßiges Swatches-Grid mit einheitlichen Kacheln */
.color-swatches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
    justify-items: center;
}
.color-swatch-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: 64px;
    margin-bottom: 4px;
}
.color-swatch-label input[type="radio"] {
    display: none;
}
.staendi-color-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #ffffff;
    padding: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
}
.staendi-color-mask {
    width: 100%;
    height: 100%;
    display: block;
    -webkit-mask-image: url('../images/core/staendi_farbe_icon.png');
    mask-image: url('../images/core/staendi_farbe_icon.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
.color-swatch-label input:checked + .staendi-color-icon-box {
    border-color: #007bff !important;
    border-width: 2px !important;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.28);
    background: #fff;
}
.color-swatch-label:hover .staendi-color-icon-box {
    border-color: #007bff;
    transform: scale(1.05);
}
.color-swatch-name {
    font-size: 0.7rem;
    color: #444;
    width: 100%;
    text-align: center;
    line-height: 1.15;
    font-weight: 500;
    word-wrap: break-word;
    height: 2.3em;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.cart-product-color-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #fff;
    border-radius: 6px;
    padding: 1px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    display: inline-flex;
}

/* Produktseite: Varianten inline */
.product-variant-selectors label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}
.product-variant-selectors .form-control {
    border-radius: 8px;
    font-size: 0.95rem;
}

/* ===== PayPal Button Container ===== */
#paypal-button-container {
    min-height: 50px;
}
.paypal-secure-info {
    text-align: center;
    color: #aaa;
    font-size: 0.78rem;
    margin-top: 0.75rem;
}
.paypal-secure-info i {
    color: #28a745;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .cart-product-img {
        width: 50px;
        height: 50px;
    }
    .cart-page-title {
        font-size: 1.6rem;
    }
    #cart-content .table th:nth-child(5),
    #cart-content .table td:nth-child(5) {
        display: none;
    }
}

@media (max-width: 576px) {
    .order-summary-card .card-body {
        padding: 1.25rem;
    }
}
