/* ===================================================================
   MODERN CART PAGE STYLES - COMPLETE REDESIGN
   Clean, professional layout with excellent UX
   =================================================================== */

/* ===== HIDE WOOCOMMERCE DEFAULT PAGE TITLES ===== */

/* Hide all possible title variations that WooCommerce/WordPress outputs */
.cart-page-modern .entry-title,
.cart-page-modern .page-title,
.woocommerce-cart .entry-title,
.woocommerce-cart .page-title,
.woocommerce-cart h1.entry-title,
.woocommerce-cart h1.page-title,
.woocommerce-cart .entry-header,
.woocommerce-cart header.entry-header,
body.woocommerce-cart .entry-title,
body.woocommerce-cart .page-title,
body.woocommerce-cart h1,
.woocommerce-cart > h1:first-child {
    display: none !important;
}

/* Keep your custom hero section visible */
.cart-hero,
.cart-hero h1,
.cart-hero .cart-title {
    display: block !important;
}

/* ===== CART PAGE CONTAINER ===== */

.cart-page-modern {
    min-height: 100vh;
    background: #f8f9fa;
}

/* ===== CART HERO SECTION ===== */

.cart-hero {
    background: linear-gradient(135deg, #001429 0%, #0a1929 100%);
    padding: 200px 40px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cart-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 102, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.cart-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cart-title {
    font-size: 56px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.cart-description {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
}

/* ===== CART CONTENT AREA ===== */

.cart-content-area {
    padding: 80px 20px;
}

/* ===== HIDE WOOCOMMERCE DUPLICATE TITLES ===== */

.cart-page-modern .page-title,
.cart-page-modern .woocommerce-cart .entry-title,
.cart-page-modern .entry-header,
.woocommerce-cart .page-title,
.woocommerce-cart .entry-title,
.woocommerce-cart h1.entry-title,
body.woocommerce-cart .entry-header {
    display: none !important;
}

/* ===== EMPTY CART STATE ===== */

.empty-cart-container {
    max-width: 600px;
    margin: 100px auto;
    padding: 80px 40px;
    background: white;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.empty-cart-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.empty-cart-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 50%;
    color: #9ca3af;
}

.empty-cart-content h2 {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.empty-cart-content p {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

.btn-shop-now {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #0066FF, #0052CC);
    color: white !important;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
    margin-top: 10px;
}

.btn-shop-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.4);
}

.btn-shop-now svg {
    transition: transform 0.3s ease;
}

.btn-shop-now:hover svg {
    transform: translateX(4px);
}

/* ===== CART LAYOUT - TWO COLUMNS ===== */

.cart-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: start;
}

/* ===== LEFT COLUMN: CART ITEMS ===== */

.cart-items-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ===== CART ITEMS LIST ===== */

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    background: white;
    border-radius: 16px;
    padding: 25px;
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 25px;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.cart-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cart-item.removing {
    opacity: 0.5;
    pointer-events: none;
}

/* Product Image */
.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    border: 2px solid #f3f4f6;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

/* Product Info */
.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
}

.cart-item-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cart-item-title a:hover {
    color: #0066FF;
}

.cart-item-meta {
    font-size: 14px;
    color: #6b7280;
}

.cart-item-price-mobile {
    display: none;
    font-size: 18px;
    font-weight: 700;
    color: #0066FF;
    margin-top: 8px;
}

.backorder-notice {
    font-size: 13px;
    color: #f59e0b;
    font-weight: 600;
    margin: 5px 0 0;
}

/* Quantity Control */
.cart-item-quantity {
    display: flex;
    align-items: center;
}

.cart-item-quantity .quantity {
    margin: 0;
}

.cart-item-quantity input[type="number"] {
    width: 80px;
    padding: 12px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.cart-item-quantity input[type="number"]:focus {
    border-color: #0066FF;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* Subtotal */
.cart-item-subtotal {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    text-align: right;
    min-width: 100px;
}

.cart-item-subtotal .amount {
    color: #0066FF;
}

/* Remove Button */
.cart-item-remove {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    border: none;
    border-radius: 10px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* ===== CART ACTIONS BAR ===== */

.cart-actions-bar {
    background: white;
    padding: 25px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.btn-continue-shopping,
.btn-update-cart {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-continue-shopping {
    background: #f3f4f6;
    color: #374151 !important;
    border: 2px solid #e5e7eb;
}

.btn-continue-shopping:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.btn-update-cart {
    background: #0066FF;
    color: white;
    border: 2px solid #0066FF;
}

.btn-update-cart:hover {
    background: #0052CC;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

/* ===== COUPON SECTION ===== */

.coupon-section {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.coupon-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.coupon-header svg {
    color: #0066FF;
}

.coupon-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.coupon-form {
    display: flex;
    gap: 12px;
}

.coupon-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.coupon-input:focus {
    border-color: #0066FF;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.btn-apply-coupon {
    padding: 14px 32px;
    background: #0066FF;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-apply-coupon:hover {
    background: #0052CC;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

/* ===== RIGHT COLUMN: ORDER SUMMARY ===== */

.cart-summary-column {
    position: relative;
}

.cart-summary-sticky {
    position: sticky;
    top: 100px;
}

.order-summary {
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.order-summary h2 {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
}

/* Summary Lines */
.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 15px;
}

.summary-line span:first-child {
    color: #6b7280;
    font-weight: 500;
}

.summary-value {
    font-weight: 700;
    color: #1a1a1a;
}

.summary-value.discount {
    color: #10b981;
}

.coupon-line {
    background: #f0fdf4;
    margin: 0 -35px;
    padding: 15px 35px;
    border-bottom: none;
}

.coupon-line svg {
    color: #10b981;
    margin-right: 5px;
}

.coupon-line .summary-value {
    color: #10b981;
}

/* Total */
.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    margin-top: 15px;
    border-top: 2px solid #1a1a1a;
}

.summary-total span:first-child {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.total-value {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #0066FF !important;
}

/* Checkout Button */
.checkout-button-wrapper {
    margin-top: 25px;
}

.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #0066FF, #0052CC);
    color: white !important;
    border-radius: 12px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
}

.btn-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.4);
}

.btn-checkout svg {
    transition: transform 0.3s ease;
}

.btn-checkout:hover svg {
    transform: translateX(4px);
}

/* Secure Badge */
.secure-checkout-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #065f46;
}

.secure-checkout-badge svg {
    color: #10b981;
}

/* ===== WOOCOMMERCE NOTICES ===== */

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    max-width: 1400px;
    margin: 0 auto 30px;
    padding: 20px 25px;
    border-radius: 12px;
    border-left-width: 4px;
    font-weight: 600;
}

.woocommerce-message {
    background: #f0fdf4;
    border-left-color: #10b981;
    color: #065f46;
}

.woocommerce-error {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.woocommerce-info {
    background: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cart-summary-sticky {
        position: static;
    }

    .cart-item {
        grid-template-columns: 80px 1fr auto;
        gap: 20px;
    }

    .cart-item-quantity {
        grid-column: 2;
        margin-top: 15px;
        justify-content: flex-start;
    }

    .cart-item-subtotal {
        grid-column: 2;
        text-align: left;
        margin-top: 10px;
    }

    .cart-item-remove {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (max-width: 768px) {
    .cart-hero {
        padding: 170px 20px 60px;
    }

    .cart-title {
        font-size: 36px;
    }

    .cart-description {
        font-size: 18px;
    }

    .cart-content-area {
        padding: 60px 20px;
    }

    .empty-cart-container {
        padding: 60px 30px;
        margin: 60px auto;
    }

    .empty-cart-icon {
        width: 100px;
        height: 100px;
    }

    .empty-cart-content h2 {
        font-size: 26px;
    }

    .empty-cart-content p {
        font-size: 16px;
    }

    .cart-item {
        grid-template-columns: 70px 1fr;
        gap: 15px;
        padding: 20px 15px;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .cart-item-title {
        font-size: 16px;
    }

    .cart-item-price-mobile {
        display: block;
    }

    .cart-item-quantity {
        grid-column: 1 / -1;
        margin-top: 15px;
    }

    .cart-item-quantity input[type="number"] {
        width: 70px;
        padding: 10px 6px;
    }

    .cart-item-subtotal {
        display: none;
    }

    .cart-item-remove {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }

    .cart-actions-bar {
        flex-direction: column;
        padding: 20px 15px;
        gap: 12px;
    }

    .btn-continue-shopping,
    .btn-update-cart {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 14px;
    }

    .coupon-section {
        padding: 20px 15px;
    }

    .coupon-form {
        flex-direction: column;
    }

    .btn-apply-coupon {
        width: 100%;
    }

    .order-summary {
        padding: 25px 20px;
    }

    .order-summary h2 {
        font-size: 22px;
    }

    .summary-line {
        font-size: 14px;
    }

    .coupon-line {
        margin: 0 -20px;
        padding: 15px 20px;
    }

    .total-value {
        font-size: 26px !important;
    }

    .btn-checkout {
        padding: 16px 25px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .cart-hero {
        padding: 140px 15px 50px;
    }

    .cart-title {
        font-size: 28px;
    }

    .cart-description {
        font-size: 16px;
    }

    .cart-content-area {
        padding: 40px 15px;
    }

    .empty-cart-container {
        padding: 50px 20px;
    }

    .empty-cart-icon {
        width: 80px;
        height: 80px;
    }

    .empty-cart-content h2 {
        font-size: 22px;
    }

    .cart-item {
        padding: 15px 12px;
    }

    .cart-item-title {
        font-size: 15px;
    }

    .order-summary h2 {
        font-size: 20px;
    }

    .total-value {
        font-size: 24px !important;
    }
}

/* ===== LOADING STATES ===== */

.cart-item.updating {
    opacity: 0.6;
    pointer-events: none;
}

.btn-update-cart.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}