/* Sepet Sayfası CSS */

.cart-item {
    margin-bottom: 15px;
}

.cart-item .row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    align-items: start;
}

.cart-item .col {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 120px;
}

.product-info-top {
    align-self: start;
}

.product-info-bottom {
    align-self: end;
}

.campaign-info {
    margin-bottom: 8px;
    font-size: 13px;
}

.product-title {
    margin-bottom: 0;
    font-size: 14px;
}

.cart-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 5px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.badge-stock {
    background: #d32f2f;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    margin-top: 2px;
    display: block;
}

.campaign-info {
    color: #ff6b35;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 500;
}

.cart-item-info {
    color: #707070;
    font-size: 13px;
    font-weight: 500;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.variant-info {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 16px;
}

.current-price {
    color: #d32f2f;
    font-size: 16px;
    font-weight: 700;
}

.discount-badge {
    background: #4caf50;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: none;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
    margin-left: auto;
}

.quantity-controls button {
    background: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    color: #666;
    transition: background 0.2s;
}

.quantity-controls button:hover {
    background: #f5f5f5;
}

.quantity-controls input {
    border: none;
    text-align: center;
    width: 50px;
    font-weight: 600;
}

.quantity-controls input:focus {
    outline: none;
    box-shadow: none;
}

.quantity-controls input[type="number"]::-webkit-inner-spin-button,
.quantity-controls input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-controls input[type="number"] {
    -moz-appearance: textfield;
}

.delete-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
}

.delete-btn:hover {
    color: #d32f2f;
}

/* Sepet Özeti - Sticky */
.cart-summary {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
}

.cart-summary h5 {
    font-size: 18px;
    font-weight: 600;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 1px 0;
    font-size: 16px;
    color: #666;
}

.summary-row.total {
    border-top: 2px solid #eee;
    margin-top: 10px;
    padding-top: 5px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.summary-row.total .price {
    font-size: 18px;
    color: #d32f2f;
}

.discount-section {
    background: #e8f5e9;
    padding: 12px;
    border-radius: 6px;
    margin: 5px 0;
}

.discount-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #2e7d32;
}

.discount-toggle .toggle-text {
    flex: 1;
}

.discount-toggle i {
    transition: transform 0.3s;
}

.discount-toggle.active i {
    transform: rotate(180deg);
}

.discount-details {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.discount-details.show {
    display: block;
}

.discount-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    color: #666;
}

.discount-code-area {
    display: none;
    margin: 0 0 10px 0;
}

.discount-code-area.show {
    display: block;
}

.discount-code-input {
    display: flex;
    gap: 8px;
}

.discount-code-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.discount-code-input button {
    padding: 10px 20px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.discount-code-input button:hover {
    background: #e55a2b;
}

.discount-code-btn {
    background: none;
    border: none;
    color: #ff6b35;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    padding: 0;
    margin-bottom: 10px;
}

.free-shipping-label {
    color: #ff6b35;
    font-size: 14px;
    margin: 10px 0;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    transition: background 0.2s;
}

.checkout-btn:hover {
    background: #e55a2b;
}

/* Mobil Sepet Özeti Bottom Sheet */
.mobile-cart-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 15px;
}

.mobile-cart-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.mobile-cart-toggle .left-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    cursor: pointer;
}

.mobile-cart-toggle .total-price {
    font-size: 16px;
    font-weight: 700;
    color: #d32f2f;
}

.mobile-cart-toggle .items-count {
    font-size: 13px;
    color: #000;
    font-weight: 500;
}

.mobile-cart-toggle .arrow-icon {
    background: #ff6b35;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.mobile-cart-toggle .arrow-icon.rotated {
    transform: rotate(180deg);
}

.mobile-checkout-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    width: 100%;
    max-width: 50%;
    text-align: center;
}

.mobile-cart-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-cart-modal.show {
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-cart-content {
    padding: 20px;
    padding-bottom: 130px;
}

.mobile-cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.mobile-cart-overlay.show {
    display: block;
}

.price-drop {
    color: #2e7d32;
    font-size: 13px;
    font-weight: 600;
}

.price-drop-item {
    color: #2e7d32;
    font-size: 13px;
    font-weight: 600;
    display: none;
}

.price-drop.hide-mobile {
    display: block;
}

/* progress bar */
.free-shipping-progress-wrapper {
    padding: 10px 1px;
    border-radius: 8px;
}

.progress-bar-container {
    margin-bottom: 8px;
}

.progress-bar-bg {
    width: 100%;
    height: 15px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #dd9c84 0%, #bf7f67 100%);
    border-radius: 4px;
    transition: width 1s ease;
    position: relative;
    overflow: hidden;
    background-size: 200% 100%;
    animation: progressShine 4s ease-in-out 1;
}

@keyframes progressShine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.progress-bar-fill.complete {
    background: linear-gradient(90deg, #ff8153 0%, #ff7a49 100%);
    animation: none;
}

.shipping-message {
    font-size: 14px;
    line-height: 1.5;
    color: #ff6b35;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.shipping-message span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shipping-message strong {
    color: #ff6b35;
    font-weight: 600;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .mobile-pd {
        padding-left: unset;
        padding-right: unset;
    }

    .row {
        margin-left: 0;
        margin-right: 0;
    }

    .cart-item {
        padding: 8px;
    }

    .cart-item .row {
        margin: 0;
    }

    .cart-item .col-auto {
        padding: 0;
        padding-right: 10px;
    }

    .cart-item .col {
        padding: 0;
        min-height: 0;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .badge-stock {
        font-size: 9px;
        padding: 2px 4px;
        margin-top: 3px;
    }

    .campaign-info {
        font-size: 10px;
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .cart-item-info {
        font-size: 10px;
    }

    .product-title {
        font-size: 12px;
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .variant-info {
        font-size: 10px;
        margin-bottom: 0;
    }

    .current-price {
        font-size: 12px;
    }

    .old-price {
        font-size: 12px;
    }

    .discount-badge {
        font-size: 9px;
        padding: 1px 4px;
        display: none;
    }

    .price-drop.hide-mobile {
        display: none;
    }

    .d-flex.align-items-center.justify-content-between {
        justify-content: flex-end !important;
        gap: 10px !important;
    }

    .price-section {
        margin-right: 5px;
    }

    .quantity-controls {
        border-radius: 4px;
    }

    .quantity-controls button {
        padding: 4px 8px;
        font-size: 14px;
    }

    .quantity-controls input {
        width: 25px;
        font-size: 13px;
    }

    .delete-btn {
        font-size: 16px;
        padding: 4px;
    }

    .delete-btn span {
        display: none;
    }

    .price-section {
        gap: 5px;
        flex-wrap: wrap;
    }

    .d-flex.gap-3 {
        gap: 8px !important;
        max-width: 100%;
    }

    .cart-item .d-flex {
        margin-top: 8px;
        flex-wrap: wrap;
        overflow-x: hidden;
    }

    .cart-summary {
        display: none;
    }

    .mobile-cart-footer {
        display: block;
    }

    .mobile-cart-modal {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .mobile-cart-content {
        max-width: 100%;
        overflow-x: hidden;
    }

    .mobile-progress .progress-bar-bg {
        height: 10px !important;
        width: 100% !important;
    }

    .mobile-progress .shipping-message {
        font-size: 12px !important;
        margin-top: 0 !important;
        display: block !important;
        width: 100% !important;
    }
}

/* Tüm cihazlarda mobil alan kapalı başlasın */
.product-info-mobile {
    display: none !important;
}

/* 420px ALTINDA SADECE mobil alan açılsın, desktop kapansın */
@media (max-width: 420px) {
    .product-info-desktop {
        display: none !important;
    }

    .product-info-mobile {
        display: flex !important;
    }

    .cart-item-image {
        width: 50px;
        height: 50px;
    }
}

/* Cross-sell bölümü */
.crosssell-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #eee;
}

.crosssell-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.crosssell-title i {
    color: #ff6b35;
    margin-right: 4px;
}

.crosssell-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.crosssell-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 10px;
}

.crosssell-card-img { flex-shrink: 0; }

.crosssell-card-img img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 6px;
}

.crosssell-card-info { flex: 1; min-width: 0; }

.crosssell-card-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    margin-bottom: 4px;
}

.crosssell-card-name:hover { color: #ff6b35; }

.crosssell-card-price {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.crosssell-old-price {
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
}

.crosssell-current-price {
    font-size: 13px;
    font-weight: 700;
    color: #d32f2f;
}

.crosssell-card-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.crosssell-card-btn {
    background: #ff6b35;
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crosssell-card-btn i { pointer-events: none; }
.crosssell-card-btn:hover { background: #e55a2b; }

.crosssell-swiper {
    position: relative;
    padding: 0 30px;
}

.crosssell-swiper .swiper-button-next,
.crosssell-swiper .swiper-button-prev {
    width: 26px;
    height: 26px;
    background: #ff6b35;
    border-radius: 50%;
    color: white;
}

.crosssell-swiper .swiper-button-next::after,
.crosssell-swiper .swiper-button-prev::after {
    font-size: 12px;
    font-weight: 700;
}

.crosssell-swiper .swiper-button-next { right: 0; }
.crosssell-swiper .swiper-button-prev { left: 0; }

@media (max-width: 479px) {
    .crosssell-swiper .swiper-button-next,
    .crosssell-swiper .swiper-button-prev { display: none; }
    .crosssell-swiper { padding: 0; }
}

@media (min-width: 480px) {
    .crosssell-grid { grid-template-columns: 1fr 1fr; }
    .crosssell-card-img img { width: 70px; height: 70px; }
    .crosssell-card-name { font-size: 13px; }
    .crosssell-current-price { font-size: 14px; }
    .crosssell-card-btn { width: 38px; height: 38px; font-size: 15px; }
}

/* Stok Uyarı Modalı */
.stock-warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.stock-warning-modal.show {
    opacity: 1;
    visibility: visible;
}

.stock-warning-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.stock-warning-modal.show .stock-warning-content {
    transform: scale(1);
}

.stock-warning-icon {
    width: 60px;
    height: 60px;
    background-color: #f0f8ff;
    border: 3px solid #87ceeb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
}

.stock-warning-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.stock-warning-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.stock-warning-button {
    background-color: #E4B65D;
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.stock-warning-button:hover {
    background-color: #d4a54d;
}

@media (max-width: 768px) {
    .stock-warning-content {
        padding: 20px;
        margin: 20px;
    }

    .stock-warning-title {
        font-size: 20px;
    }

    .stock-warning-message {
        font-size: 14px;
    }
}
