/* ========================================
   Shopping Cart Page Styles
   ======================================== */

.cart-section {
    padding: 60px 20px;
    background: #f9f9f9;
    min-height: calc(100vh - 200px);
}

.cart-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Cart Header */
.cart-header {
    text-align: center;
    margin-bottom: 50px;
}

.cart-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.cart-title i {
    margin-right: 10px;
    color: #c41e3a;
}

.cart-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* Cart Wrapper */
.cart-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

/* Empty Cart */
.empty-cart {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.empty-cart-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-weight: 700;
}

.empty-cart p {
    color: #999;
    margin-bottom: 30px;
    font-size: 1rem;
}

/* Cart Items List */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cart Item Card */
.cart-item-card {
    display: grid;
    grid-template-columns: 120px 1fr 100px 120px 120px 60px;
    gap: 20px;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.cart-item-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #c41e3a;
}

/* Item Image */
.item-image {
    width: 120px;
    height: 120px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Item Info */
.item-info {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.item-name a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.item-name a:hover {
    color: #c41e3a;
}

.item-variant {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 6px 0;
}

.variant-label {
    font-weight: 600;
}

.variant-value {
    color: #999;
}

.item-description {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
    line-height: 1.4;
}

/* Item Price */
.item-price {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.price-label {
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.price-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Item Quantity */
.item-quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qty-label {
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn-minus,
.qty-btn-plus {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.qty-btn-minus:hover,
.qty-btn-plus:hover {
    background: #f5f5f5;
    color: #c41e3a;
}

.qty-input {
    width: 50px;
    height: 32px;
    border: none;
    text-align: center;
    font-weight: 700;
    color: #1a1a1a;
    background: white;
    font-size: 0.9rem;
}

.qty-input:focus {
    outline: none;
}

/* Item Total */
.item-total {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.total-label {
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.total-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #c41e3a;
}

/* Item Actions */
.item-actions {
    display: flex;
    justify-content: center;
}

.btn-remove {
    width: 44px;
    height: 44px;
    border: none;
    background: #f5f5f5;
    color: #e74c3c;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #e74c3c;
    color: white;
    transform: scale(1.05);
}

/* Cart Summary Section */
.cart-summary-section {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.summary-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 25px 0;
}

/* Summary Details */
.summary-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.summary-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
}

.summary-value.free {
    color: #27ae60;
}

/* Summary Divider */
.summary-divider {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* Summary Total */
.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.summary-total .total-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
}

.summary-total .total-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: #c41e3a;
}

/* Buttons */
.btn-checkout,
.btn-continue-shopping {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    margin-bottom: 10px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-checkout {
    background: #c41e3a;
    color: white;
}

.btn-checkout:hover {
    background: #a01729;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-continue-shopping {
    background: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #ddd;
}

.btn-continue-shopping:hover {
    background: #e8e8e8;
    border-color: #c41e3a;
    color: #c41e3a;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #666;
}

.badge i {
    color: #c41e3a;
    font-size: 1rem;
}

.item-purchase-info{
    display: none;
}

/* Desktop: Show item-purchase-info in 1024+ media query if needed, but hide by default */

/* Responsive Design */
@media (max-width: 1024px) {
    .cart-wrapper {
        grid-template-columns: 1fr;
    }

    .cart-summary-section {
        position: relative;
        top: auto;
    }

    .cart-item-card {
        grid-template-columns: 100px 1fr 80px 80px 80px;
    }

    .item-image {
        width: 100px;
        height: 100px;
    }

    .item-actions {
        grid-column: -2;
    }
}

@media (max-width: 768px) {
    .cart-section {
        padding: 40px 15px;
    }

    .cart-title {
        font-size: 2rem;
    }

    .cart-item-card {
        grid-template-columns: 80px 1fr;
        gap: 15px;
        padding: 15px;
        position: relative;
    }

    .item-image {
        width: 80px;
        height: 80px;
        grid-row: 1 / 3;
    }

    .item-info {
        grid-column: 2;
    }

    .item-price,
    .item-quantity{
        display: none;
    }
    .item-actions {
        grid-column: 2;
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: 10px;
        align-items: center;
        text-align: left;
    }

    .item-total{
        display: none;
    }

    .price-label,
    .qty-label,
    .total-label {
        text-align: left;
        margin-bottom: 0;
        display: none;
    }

    .item-actions {
        position: absolute;
        top: 12px;
        right: 12px;
        grid-column: unset;
        grid-template-columns: unset;
        gap: 0;
        padding: 0;
    }

    .item-purchase-info {
        display: flex;
        flex-direction: row;
        gap: 8px;
    }
    .item-purchase-info .item-price,
    .item-purchase-info .item-quantity {
        display: flex;
    }
}

@media (max-width: 576px) {
    .cart-section {
        padding: 30px 12px;
    }

    .cart-title {
        font-size: 1.5rem;
    }

    .cart-item-card {
        grid-template-columns: 70px 1fr;
        gap: 12px;
        padding: 12px;
        position: relative;
    }

    .item-image {
        width: 70px;
        height: 70px;
    }

    .item-name {
        font-size: 0.9rem;
    }

    .item-description {
        display: none;
    }

    .item-variant {
        font-size: 0.8rem;
    }

    .item-actions {
        position: absolute;
        top: 10px;
        right: 10px;
        grid-column: unset;
        grid-template-columns: unset;
        padding: 0;
        display: flex !important;
        gap: 0;
    }

    .summary-card {
        padding: 20px;
    }

    .summary-title {
        font-size: 1.1rem;
    }

    .btn-checkout,
    .btn-continue-shopping {
        font-size: 0.85rem;
        padding: 11px;
    }
}
