/**
 * E-Commerce Shopping Cart Styling for SSCI Security Services
 * Premium 3-column responsive layout with gradient backgrounds
 */

.ssci-cart-wrapper {
    max-width: 1400px;
    margin: 30px auto;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.ssci-cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.ssci-cart-items {
    padding: 40px;
    background: #fafafa;
    max-height: 800px;
    overflow-y: auto;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.cart-header h2 {
    font-size: 28px;
    color: #333;
    margin: 0;
    font-weight: 700;
}

.item-count {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}

/* Cart Item Cards */
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cart-item:hover {
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.item-description {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.item-price {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
}

/* Quantity Controls */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0f4ff;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #667eea;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #764ba2;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
}

.item-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.item-total-price {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.remove-btn {
    width: 100%;
    padding: 6px;
    background: #f56565;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.remove-btn:hover {
    background: #e53e3e;
}

/* Empty Cart Message */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-cart-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-cart p {
    font-size: 16px;
    margin: 0;
}

/* Cart Summary Sidebar */
.ssci-cart-summary {
    padding: 40px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    max-height: 100vh;
}

.summary-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
}

.summary-row.total {
    padding: 20px 0;
    font-size: 20px;
    font-weight: 700;
    margin-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
}

.summary-label {
    font-weight: 500;
    opacity: 0.9;
}

.summary-value {
    font-weight: 600;
}

.currency {
    font-size: 12px;
    opacity: 0.8;
}

/* Checkout Buttons */
.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.btn-checkout,
.btn-continue-shopping {
    padding: 15px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-checkout {
    background: white;
    color: #667eea;
    font-weight: 700;
    border: 2px solid white;
}

.btn-checkout:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-continue-shopping {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-continue-shopping:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Discount Section */
.discount-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.discount-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.9;
}

.discount-input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    margin-bottom: 8px;
}

.apply-discount {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.apply-discount:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Grid - 3 Column View */
.cart-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

.service-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-5px);
}

.service-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.service-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.service-price {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.add-to-cart-btn:hover {
    background: #764ba2;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ssci-cart-container {
        grid-template-columns: 1fr;
    }

    .ssci-cart-summary {
        position: static;
        max-height: none;
    }

    .cart-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ssci-cart-wrapper {
        margin: 15px;
        padding: 10px;
    }

    .ssci-cart-items,
    .ssci-cart-summary {
        padding: 20px;
    }

    .cart-item {
        grid-template-columns: 60px 1fr;
        gap: 15px;
    }

    .item-total {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .item-total-price {
        font-size: 16px;
    }

    .remove-btn {
        width: auto;
        flex: 1;
    }

    .cart-services-grid {
        grid-template-columns: 1fr;
    }

    .checkout-actions {
        flex-direction: column;
    }

    .btn-checkout,
    .btn-continue-shopping {
        width: 100%;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item {
    animation: slideIn 0.3s ease-in;
}

/* Scrollbar Styling */
.ssci-cart-items::-webkit-scrollbar {
    width: 8px;
}

.ssci-cart-items::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.ssci-cart-items::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.ssci-cart-items::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Print Styles */
@media print {
    .checkout-actions,
    .discount-section {
        display: none;
    }

    .cart-item {
        page-break-inside: avoid;
    }
}
