/**
 * Shopping Cart - Exact Target Design Implementation
 * Colors, spacing, typography matched exactly to specification
 */

/* 0) Page Shell */
.modern-cart-layout {
    background: #F6F7F8;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

@media (min-width: 768px) {
    .cart-container {
        padding: 24px;
    }
}

@media (min-width: 1024px) {
    .cart-container {
        padding: 32px;
    }
}

/* Grid System - 12 column with 24px gutter */
.cart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .cart-grid {
        grid-template-columns: 2fr 1fr; /* 8+4 columns */
        gap: 24px;
    }
}

/* 1) Top Strip */
.cart-breadcrumb {
    margin-bottom: 16px;
    padding-bottom: 16px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4B5563;
    text-decoration: none;
    transition: all 0.2s;
}

.back-link:hover {
    text-decoration: underline;
}

.back-link i {
    font-size: 14px;
}

/* 2) Step Progress (Stepper) */
.step-progress {
    margin-bottom: 24px;
}

.step-progress-wrapper {
    display: flex;
    align-items: center;
    height: 56px;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.step-item {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-weight: 600;
    font-size: 16px;
    color: white;
    z-index: 1;
}

/* Active step (Sepet) */
.step-item.active {
    background: #2B7A71;
    color: white;
    border-radius: 12px 0 0 12px;
}

.step-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    right: -28px;
    width: 0;
    height: 0;
    border-left: 28px solid #2B7A71;
    border-top: 28px solid transparent;
    border-bottom: 28px solid transparent;
    z-index: 2;
}

/* Inactive steps */
.step-item.inactive {
    background: #9CA3AF;
    color: rgba(255, 255, 255, 0.6);
    margin-left: -28px;
    padding-left: 36px;
}

.step-item.inactive:nth-child(2)::after {
    content: '';
    position: absolute;
    top: 0;
    right: -28px;
    width: 0;
    height: 0;
    border-left: 28px solid #9CA3AF;
    border-top: 28px solid transparent;
    border-bottom: 28px solid transparent;
    z-index: 1;
}

.step-item.inactive:last-child {
    border-radius: 0 12px 12px 0;
}

/* 3) Right Top Info Box (Green Banner) */
.order-summary-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
    height: fit-content;
}

.info-box {
    background: #146C63;
    color: white;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}

.info-box-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box-content {
    flex: 1;
}

.info-box-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.info-box-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    font-size: 14px;
}

/* 4) Order Summary Card */
.summary-card {
    background: white;
    border: 1px solid #E5E7EB;
    padding: 20px;
}

.summary-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #374151;
}

.summary-line.total {
    font-weight: 700;
    color: #111827;
    padding-top: 12px;
    border-top: 1px solid #E5E7EB;
    margin-top: 8px;
    margin-bottom: 16px;
}

.coupon-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #146C63;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.coupon-trigger:hover {
    text-decoration: underline;
}

.coupon-trigger i {
    font-size: 16px;
}

/* CTA Button */
.checkout-btn {
    width: 100%;
    height: 48px;
    background: #146C63;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-btn:hover {
    background: #0F5A52;
}

.checkout-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px #A7F3D0;
}

/* 5) Seller Group Card */
.seller-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.seller-group {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
}

/* Seller Header */
.seller-header {
    padding: 16px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.seller-name {
    color: #146C63;
    text-decoration: none;
}

.seller-name:hover {
    text-decoration: underline;
}

.seller-chevron {
    color: #6B7280;
    font-size: 16px;
    margin-left: 4px;
}

/* 5.1) Shipping Banner (Blue Strip) */
.shipping-banner {
    height: 40px;
    background: #EFF6FF;
    border: 1px solid #DBEAFE;
    border-radius: 8px;
    margin: 0 16px 16px 16px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shipping-banner-icon {
    font-size: 20px;
    color: #1D4ED8;
}

.shipping-banner-text {
    flex: 1;
    font-size: 14px;
    color: #1D4ED8;
    font-weight: 600;
}

.shipping-banner-link {
    color: #1D4ED8;
    text-decoration: none;
    font-size: 14px;
}

.shipping-banner-link:hover {
    text-decoration: underline;
}

/* 5.2) Product Rows */
.product-list {
    padding: 0;
}

.product-row {
    display: grid;
    grid-template-columns: 64px 1fr auto auto auto;
    gap: 12px;
    align-items: center;
    padding: 16px 8px;
    border-top: 1px solid #F3F4F6;
    transition: background-color 0.2s;
    position: relative;
}

.product-row:first-child {
    border-top: none;
}

.product-row:hover {
    background: #FAFAFB;
}

.product-row:hover .product-cover {
    transform: scale(1.02);
}

/* Product Cover */
.product-cover {
    width: 64px;
    height: 86px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    object-fit: cover;
    transition: transform 0.2s;
}

/* Product Details */
.product-details {
    min-width: 0;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    color: #146C63;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

.product-title:hover {
    text-decoration: underline;
}

.product-author {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 2px;
}

.product-variant {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 8px;
}

.product-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}

.action-link {
    color: #6B7280;
    text-decoration: none;
    transition: color 0.2s;
}

.action-link:hover {
    color: #374151;
    text-decoration: underline;
}

.action-link.remove {
    color: #B91C1C;
}

.action-divider {
    color: #E5E7EB;
}

/* Quantity Selector */
.qty-selector {
    width: 64px;
}

.qty-dropdown {
    width: 100%;
    height: 36px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 0 8px;
    font-size: 14px;
    background: white;
    color: #111827;
    cursor: pointer;
}

/* Product Price */
.product-price {
    text-align: right;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    min-width: 80px;
}

/* 5.3) Group Footer */
.group-footer {
    height: 44px;
    background: #F9FAFB;
    border-top: 1px solid #F3F4F6;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.subtotal {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

/* Mobile Responsive */
@media (max-width: 1023px) {
    .order-summary-panel {
        position: static;
        order: 2;
    }

    .seller-groups {
        order: 1;
    }
}

@media (max-width: 767px) {
    .product-row {
        grid-template-columns: 64px 1fr;
        grid-template-rows: auto auto;
        gap: 8px;
        padding: 12px 8px;
    }

    .product-details {
        grid-column: 2;
        grid-row: 1;
    }

    .qty-selector,
    .product-price,
    .product-actions {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        margin-top: 8px;
    }

    .qty-selector {
        width: 50px;
        margin-right: 12px;
    }

    .product-price {
        text-align: left;
        margin-right: 12px;
    }

    .product-actions {
        font-size: 12px;
    }
}

/* Hidden elements */
.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus styles */
.focus-ring:focus-visible {
    outline: 2px solid #146C63;
    outline-offset: 2px;
}