/* Modern Minimalist Cart - Premium E-Commerce */

/* Page Header */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    padding: 3rem 0;
    border-bottom: 1px solid #e8e8e8;
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: #1a1a1a;
    margin: 0;
    font-weight: 300;
    letter-spacing: -0.03em;
    position: relative;
}

.cart-count {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: 6rem 2rem;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.empty-cart h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.empty-cart p {
    font-size: 1.15rem;
    margin-bottom: 3rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    color: #666;
    line-height: 1.8;
    font-weight: 300;
}

/* Cart Items Container */
.cart-items {
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    margin-bottom: 3rem;
    border: 1px solid #e8e8e8;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto auto;
    gap: 2rem;
    padding: 2.5rem;
    border-bottom: 1px solid #f5f5f5;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: white;
}

.cart-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #1a1a1a;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-item:hover::before {
    opacity: 1;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item.out-of-stock {
    background: #fafafa;
    opacity: 0.7;
}

.cart-item.out-of-stock::before {
    background: #e74c3c;
}

.cart-item:hover {
    background: #fafafa;
}

/* Product Image */
.cart-item-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(0.1);
}

.cart-item:hover .cart-item-image {
    transform: scale(1.05);
    filter: grayscale(0);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Product Details */
.cart-item-details {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.cart-item-details h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.cart-item:hover .cart-item-details h3 {
    color: #666;
}

.cart-item-meta {
    color: #999;
    font-size: 0.85rem;
    font-weight: 400;
}

.cart-item-brand {
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.size-color-info {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.size-color-info span {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.cart-item-price {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    letter-spacing: -0.01em;
}

/* Quantity Controls */
.quantity-controls {
    display: inline-flex;
    align-items: center;
    border: 2px solid #e8e8e8;
    border-radius: 0;
    overflow: hidden;
    background: white;
    transition: border-color 0.3s ease;
}

.quantity-controls:hover {
    border-color: #bbb;
}

.quantity-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: #fafafa;
    cursor: pointer;
    font-weight: 600;
    color: #1a1a1a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.2rem;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover:not(:disabled) {
    background: #1a1a1a;
    color: white;
}

.quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-input {
    width: 70px;
    text-align: center;
    padding: 0.75rem;
    border: none;
    border-left: 1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    background: white;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.stock-info {
    font-size: 0.8rem;
    margin-top: 0.75rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.stock-info.in-stock {
    color: #27ae60;
}

.stock-info.out-of-stock {
    color: #e74c3c;
    font-weight: 600;
}

.cart-item-total {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    letter-spacing: -0.02em;
}

/* Remove Button */
.remove-btn {
    background: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    overflow: hidden;
}

.remove-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.remove-btn:hover::before {
    width: 300px;
    height: 300px;
}

.remove-btn:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(231, 76, 60, 0.3);
}

/* Cart Actions */
.cart-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    border-radius: 0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
    box-shadow: 0 4px 16px rgba(26, 26, 26, 0.2);
}

.btn-primary:hover {
    background: #000;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(26, 26, 26, 0.3);
}

.btn-secondary {
    background: #1a1a1a;
    color: white;
    box-shadow: 0 4px 16px rgba(26, 26, 26, 0.2);
}

.btn-secondary:hover {
    background: #000;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(26, 26, 26, 0.3);
}

.btn-outline {
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
}

.btn-outline::before {
    background: rgba(26,26,26,0.1);
}

.btn-outline:hover {
    background: #1a1a1a;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.2);
}

/* Order Summary */
.order-summary {
    background: white;
    padding: 3rem;
    border-radius: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8e8e8;
    animation: fadeIn 0.6s ease-out 0.3s both;
    position: relative;
}

.order-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a1a1a 0%, #666 50%, #1a1a1a 100%);
}

.order-summary h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f5f5f5;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f5f5f5;
}

.summary-label {
    color: #666;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-value {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.summary-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.summary-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #e8e8e8, transparent);
    margin: 2rem 0;
}

/* Order Instructions */
.order-instructions {
    margin: 2.5rem 0;
}

.instructions-label {
    display: block;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.instructions-textarea {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid #e8e8e8;
    border-radius: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
    color: #1a1a1a;
    line-height: 1.6;
}

.instructions-textarea:hover {
    border-color: #bbb;
    background: white;
}

.instructions-textarea:focus {
    outline: none;
    border-color: #1a1a1a;
    background: white;
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.05);
}

.instructions-textarea::placeholder {
    color: #bbb;
}

/* Checkout Section */
.checkout-section {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 10px;
}

.checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 3rem;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(26, 26, 26, 0.2);
}

.checkout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.checkout-btn:hover::before {
    width: 500px;
    height: 500px;
}

.checkout-btn:enabled:hover {
    background: #000;
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(26, 26, 26, 0.35);
}

.checkout-btn:disabled {
    background: #bbb;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Warning Message */
.warning-message {
    background: linear-gradient(135deg, #fff8f0 0%, #fff3e6 100%);
    color: #856404;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #ffeaa7;
    border-radius: 0;
    border-left: 4px solid #f39c12;
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.warning-message h3 {
    margin-top: 0;
    color: #856404;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.warning-message p {
    margin: 0.75rem 0;
    line-height: 1.6;
}

.warning-message ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.warning-message li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Alert Messages */
.alert {
    padding: 1.5rem 2rem;
    border-radius: 0;
    margin-bottom: 2.5rem;
    border-left: 4px solid;
    animation: slideInDown 0.4s ease-out;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border-color: #22c55e;
}

.alert-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border-color: #ef4444;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .cart-item {
        grid-template-columns: 100px 1fr auto auto;
        gap: 1.5rem;
    }
    
    .cart-item > *:nth-child(n+5) {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 1rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 1200px) {
    .page-title {
        font-size: 3rem;
    }
    
    .cart-item {
        padding: 2rem;
    }
}

@media (max-width: 992px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .cart-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
        padding: 2rem 0;
        margin-bottom: 3rem;
    }
    
     .cart-item {
        grid-template-columns: 100px 1fr auto auto;
        gap: 1.5rem;
        padding: 2rem;
    }
    
    .cart-item-image {
        width: 100px;
        height: 100px;
    }
    
    .cart-item > *:nth-child(n+3) {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 0.75rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2.2rem;
    }
    
    .cart-header {
        padding: 1.5rem 0;
        margin-bottom: 2.5rem;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        padding: 1.5rem;
        gap: 1.25rem;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
   .cart-item-details {
        min-height: 80px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    
     .cart-item-details h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
        line-height: 1.2;
    }
    
    .cart-item-brand {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    
    .size-color-info {
        gap: 0.5rem;
        margin-top: 0.3rem;
    }
    
    .size-color-info span {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .cart-item-price {
        font-size: 1rem;
    }
    
    .cart-item-total {
        font-size: 1.1rem;
    }
    
    .quantity-controls {
        transform: scale(0.9);
    }
    
    .quantity-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .quantity-input {
        width: 50px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .stock-info {
        font-size: 0.7rem;
        margin-top: 0.5rem;
    }
    
    .remove-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        padding: 14px 36px;
        font-size: 0.85rem;
    }
    
    .order-summary {
        padding: 2rem;
    }
    
    .order-summary h2 {
        font-size: 1.8rem;
    }

    .checkout-section {
        gap: 0.75rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .cart-header {
        padding: 1rem 0;
        margin-bottom: 2rem;
    }
    
    .cart-count {
        font-size: 0.9rem;
    }
    
    .cart-item {
        grid-template-columns: 70px 1fr;
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .cart-item-image {
        width: 70px;
        height: 70px;
    }
    
    .cart-item-details h3 {
        font-size: 0.95rem;
    }
    
    .cart-item-brand {
        font-size: 0.7rem;
    }
    
       .size-color-info {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .size-color-info span {
        font-size: 0.7rem;
    }
    
    .cart-item > *:nth-child(n+3) {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .quantity-controls {
        transform: scale(0.85);
        margin-left: -5px;
    }
    
    .empty-cart {
        padding: 4rem 1.5rem;
    }
    
    .empty-cart h2 {
        font-size: 2rem;
    }
    
    .empty-cart p {
        font-size: 1rem;
    }
    
    .order-summary {
        padding: 1.5rem;
    }
    
    .order-summary h2 {
        font-size: 1.6rem;
    }
    
    .checkout-btn {
        padding: 1.25rem 2rem;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 12px 32px;
        font-size: 0.85rem;
    }
    
    .warning-message {
        padding: 1.5rem;
    }
}

@media (min-width: 769px) {
    .checkout-section {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
    }
    
    .checkout-btn {
        width: auto;
        min-width: 280px;
        flex-shrink: 0;
        order: 2;
    }
    
    .cart-actions {
        order: 1;
        margin-bottom: 0;
    }
    
    .cart-actions .btn {
        width: auto;
    }
    
     .cart-item {
        grid-template-columns: 100px 1fr auto auto;
        gap: 1.5rem;
        padding: 2rem;
    }
    
    .cart-item-image {
        width: 100px;
        height: 100px;
    }
}

/* Performance Optimizations */
.cart-item-image,
.btn,
.checkout-btn {
    will-change: transform;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}