/**
 * Cart Page Styles - Exact Copy from Template
 * 
 * @package DJI_Market
 * @version 1.0.0
 */

/* Inter Font loaded via preload in header.php for performance */

/* Ana Kurumsal Renkler */
:root {
    --primary-color: #1e3a5f;
    --secondary-color: #2c5282;
    --accent-color: #16436f;
    --text-dark: #1f2937;
    --border-color: #e5e7eb;
    --text-light: #6b7280;
}

/* Global Cart Styles */
body.woocommerce-cart {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #374151;
}

/* Hide default page title */
.woocommerce-cart .entry-title,
.page-id-4 .entry-title {
    display: none;
}

/* WooCommerce Container */
.woocommerce-container {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Page Title */
.page-title-cart {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Çift Sütunlu Yerleşim (Masaüstü) */
.cart-layout {
    display: flex;
    flex-direction: row;
    gap: 2rem;
}

.cart-main {
    flex: 2;
}

.cart-sidebar {
    flex: 1;
}

/* Kenar çubuğunu masaüstünde sabitler */
.cart-sidebar-sticky {
    position: sticky;
    top: 2rem;
}

/* ========================================
   SEPET TABLOSU
   ======================================== */
.shop_table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.shop_table thead {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

.shop_table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shop_table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.shop_table tbody tr:last-child {
    border-bottom: none;
}

.shop_table td {
    padding: 1.25rem;
    vertical-align: middle;
}

/* ========================================
   ÜRÜN GÖRSELI
   ======================================== */
.product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.product-thumbnail a {
    display: block;
}

/* ========================================
   ÜRÜN ADI
   ======================================== */
.product-name {
    min-width: 200px;
    word-break: break-word;
}

.product-name a {
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}


/* SKU */
.product-sku {
    font-size: 0.8rem;
    color: #6b7280;
    display: block;
    margin-top: 0.25rem;
}

/* ========================================
   ÜRÜN FİYATI
   ======================================== */
.product-price {
    font-weight: 600;
    color: var(--text-dark);
}

/* ========================================
   SİLME BUTONU
   ======================================== */
.product-remove .remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #fef2f2;
    color: #ef4444;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 20px;
}


/* ========================================
   MİKTAR DEĞİŞTİRME
   ======================================== */
.quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn,
.qty-btn {
    background-color: #f8fafc;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: var(--text-dark);
    font-weight: 600;
    transition: background-color 0.2s;
    font-size: 1.2rem;
    line-height: 1;
    min-width: 32px;
}


.qty-minus,
.qty-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quantity .qty,
.quantity .qty-input,
.quantity input[type="number"] {
    width: 50px;
    text-align: center;
    border: none;
    padding: 0.5rem 0.25rem;
    font-weight: 500;
    font-size: 1rem;
    -moz-appearance: textfield;
    appearance: textfield;
    outline: none;
}

.quantity .qty::-webkit-outer-spin-button,
.quantity .qty::-webkit-inner-spin-button,
.quantity .qty-input::-webkit-outer-spin-button,
.quantity .qty-input::-webkit-inner-spin-button,
.quantity input[type="number"]::-webkit-outer-spin-button,
.quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ========================================
   SEPET ÖZETİ (Sağ Sütun)
   ======================================== */
.cart_totals {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.cart_totals h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.cart_totals .shop_table {
    box-shadow: none;
    border-radius: 0;
    background: none;
}

.cart_totals .shop_table th,
.cart_totals .shop_table td {
    padding: 1rem 0;
    background: none;
    text-align: left;
}

.cart_totals .shop_table td {
    text-align: right;
    font-weight: 600;
    color: var(--text-dark);
}

.cart_totals .order-total th,
.cart_totals .order-total td {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Hide shipping calculator and destination */
.woocommerce-shipping-destination,
.woocommerce-shipping-calculator {
    display: none !important;
}

/* Clean shipping display - only show method and price */
.cart_totals .woocommerce-shipping-totals td {
    padding: 1rem 0;
}

.cart_totals .woocommerce-shipping-methods {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cart_totals .woocommerce-shipping-methods li {
    margin: 0;
    padding: 0;
}

.cart_totals .woocommerce-shipping-methods label {
    font-weight: 600;
    color: var(--text-dark);
}

/* ========================================
   ÖDEME BUTONU
   ======================================== */
.wc-proceed-to-checkout {
    margin-top: 1.5rem;
}

.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
}


/* ========================================
   BOŞ SEPET MESAJI
   ======================================== */
.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.cart-empty-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1;
}

.cart-empty h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.cart-empty .mb-6 {
    margin-bottom: 1.5rem;
}

.return-to-shop .button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s;
}


/* ========================================
   MOBİL UYUMLULUK
   ======================================== */
@media (max-width: 1024px) {
    .cart-layout {
        flex-direction: column;
    }

    .cart-sidebar {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .cart-sidebar-sticky {
        position: static;
    }
    
    .shop_table thead {
        display: none;
    }

    .shop_table tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 1.5rem;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
        border: 1px solid var(--border-color);
        overflow: hidden;
    }
    
    .shop_table tbody tr:last-child {
        margin-bottom: 0;
    }

    .shop_table td {
        display: block;
        padding: 1.25rem 1rem;
        text-align: left !important;
        border-bottom: 1px solid var(--border-color);
        position: relative;
    }
    
    .shop_table td:last-child {
        border-bottom: none;
    }

    .shop_table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        display: block;
        margin-bottom: 0.5rem;
        text-transform: uppercase;
        font-size: 0.75rem;
    }
    
    .product-thumbnail {
        text-align: center;
        padding-top: 2rem;
    }
    
    .product-thumbnail::before {
        display: none;
    }
    
    .product-remove::before {
        display: none;
    }

    .product-remove .remove {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        margin: 0;
    }
    
    .product-name a,
    .product-sku,
    .product-price {
        text-align: left !important;
    }

    .quantity {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .woocommerce-container {
        padding: 0 0.5rem;
    }
    
    .page-title-cart {
        font-size: 1.5rem;
    }
    
    /* Cart sidebar full width on mobile */
    .cart-sidebar {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0;
    }

    .cart-sidebar-sticky {
        position: static;
    }

    .cart_totals {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .cart_totals h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    /* Compact table rows - single line */
    .cart_totals .shop_table {
        width: 100%;
        display: table;
    }

    .cart_totals .shop_table tbody {
        width: 100%;
        display: table-row-group;
    }

    .cart_totals .shop_table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
        border-bottom: 1px solid #f0f0f0;
    }

    .cart_totals .shop_table th,
    .cart_totals .shop_table td {
        display: table-cell;
        vertical-align: middle;
        padding: 0.75rem 0;
        margin: 0;
    }

    .cart_totals .shop_table th {
        width: 50%;
        text-align: left;
        font-size: 0.9rem;
        font-weight: 500;
    }

    .cart_totals .shop_table td {
        width: 50%;
        text-align: right;
        font-size: 0.95rem;
        font-weight: 600;
    }

    .cart_totals .order-total {
        border-top: 2px solid #e5e5e5;
        padding-top: 0.75rem !important;
        margin-top: 0.5rem;
    }

    .cart_totals .order-total th,
    .cart_totals .order-total td {
        font-size: 1.1rem;
        padding: 0.75rem 0;
    }

    .wc-proceed-to-checkout {
        margin-top: 1rem;
    }

    .wc-proceed-to-checkout .checkout-button {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}
