/* Cart Page Styles */
.cart-content {
    max-width: 1200px;
    margin: 60px auto;
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(67, 160, 71, 0.15), 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(67, 160, 71, 0.1);
    min-height: calc(100vh - 200px);
    color: #333333;
}

.cart-content * {
    color: inherit;
}

.cart-content p {
    color: #666666;
}

.cart-table td {
    color: #333333;
}

.cart-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #43a047, #66bb6a, #43a047);
    border-radius: 20px 20px 0 0;
}

.cart-content::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(67, 160, 71, 0.03) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -20px) rotate(120deg); }
    66% { transform: translate(-15px, 15px) rotate(240deg); }
}

.cart-content h2 {
    margin-bottom: 32px;
    color: #2e7d32;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.cart-content h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #43a047, #66bb6a);
    border-radius: 2px;
}

.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f9fff9 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.1);
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
}

.cart-table th,
.cart-table td {
    padding: 20px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(67, 160, 71, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-table th {
    font-weight: 700;
    color: #2e7d32;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
}

.cart-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #43a047, #66bb6a);
}

.cart-table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-table tbody tr:hover {
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.15);
}

.cart-table tbody tr:last-child td {
    border-bottom: none;
}

.cart-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(67, 160, 71, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cart-product-image:hover {
    transform: scale(1.05);
    border-color: #43a047;
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.2);
}

.cart-qty-input {
    width: 80px;
    padding: 12px 16px;
    border: 2px solid #e8f5e9;
    border-radius: 10px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #2e7d32;
    background: linear-gradient(135deg, #f1f8e9 0%, #ffffff 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-qty-input:focus {
    border-color: #43a047;
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.1), 0 4px 12px rgba(67, 160, 71, 0.15);
    transform: translateY(-2px);
}

.cart-qty-input:hover {
    border-color: #66bb6a;
    transform: translateY(-1px);
}

.cart-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.cart-actions .btn-remove {
    font-size: 1.2rem;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    color: #c62828;
    border: 2px solid #ffcdd2;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cart-actions .btn-remove::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cart-actions .btn-remove:hover::before {
    left: 100%;
}

.cart-actions .btn-remove:hover {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: #fff;
    border-color: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(198, 40, 40, 0.3);
}

.cart-actions .btn-remove:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.2);
}

.cart-table td.cart-actions {
    vertical-align: middle;
}

.cart-total {
    margin: 32px 0 24px;
    padding: 24px 32px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-radius: 16px;
    text-align: right;
    font-weight: 700;
    font-size: 1.4rem;
    color: #2e7d32;
    border: 2px solid rgba(67, 160, 71, 0.1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.1);
}

.cart-total::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #43a047, #66bb6a, #43a047);
}

.cart-total::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(67, 160, 71, 0.05) 0%, transparent 70%);
    animation: float 10s ease-in-out infinite;
    pointer-events: none;
}

.btn-update {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-right: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-update::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-update:hover::before {
    left: 100%;
}

.btn-update:hover {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(67, 160, 71, 0.4);
}

.btn-update:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.3);
}

.btn.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #f1f8e9 100%);
    color: #2e7d32;
    border: 2px solid #43a047;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(67, 160, 71, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn.btn-primary:hover::before {
    left: 100%;
}

.btn.btn-primary:hover {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: #fff;
    border-color: #2e7d32;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(67, 160, 71, 0.3);
}

.btn.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.2);
}

.cart-empty {
    text-align: center;
    padding: 80px 40px;
    color: #2e7d32;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%);
    border-radius: 20px;
    border: 2px solid rgba(67, 160, 71, 0.1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.1);
    margin: 40px 0;
}

.cart-empty::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #43a047, #66bb6a, #43a047);
    border-radius: 20px 20px 0 0;
}

.cart-empty::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(67, 160, 71, 0.03) 0%, transparent 70%);
    animation: float 12s ease-in-out infinite;
    pointer-events: none;
}

.cart-empty i {
    font-size: 4rem;
    margin-bottom: 24px;
    color: #43a047;
    background: linear-gradient(135deg, #43a047, #66bb6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.cart-empty p {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.cart-empty .btn.btn-primary {
    position: relative;
    z-index: 1;
    margin-top: 16px;
}

/* Off-canvas Cart Styles */
.cart-offcanvas {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-offcanvas.open {
    right: 0;
}

/* Cart Header */
.cart-header {
    background: #23284a;
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.cart-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s;
}

.cart-close:hover {
    color: #6eea00;
}

/* Cart Content */
.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Cart Table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    font-weight: 600;
    color: #23284a;
}

.cart-table .product-name {
    font-weight: 500;
}

.cart-table .product-price {
    color: #6eea00;
    font-weight: 600;
}

/* Cart Actions */
.cart-actions {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.cart-total .total-amount {
    color: #6eea00;
}

.cart-buttons {
    display: flex;
    gap: 1rem;
}

/* Cart Buttons - Scoped to cart only */
.cart-offcanvas .custom-btn {
    flex: 1;
    padding: 0.8rem;
    text-align: center;
    font-weight: 500;
    background: #6eea00;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.cart-offcanvas .custom-btn:hover {
    background: #4caf50;
}

.cart-offcanvas .custom-btn.btn-secondary {
    background: #fff;
    color: #6eea00;
    border: 2px solid #6eea00;
}

.cart-offcanvas .custom-btn.btn-secondary:hover {
    background: #eaffd6;
    color: #4caf50;
    border-color: #4caf50;
}

/* Cart Empty State */
.cart-empty {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.cart-empty i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

/* Cart Item Actions */
.cart-offcanvas .btn-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s;
}

.cart-offcanvas .btn-remove:hover {
    color: #c82333;
}

/* Responsive Design */
@media (max-width: 992px) {
    .cart-content {
        max-width: 95%;
        margin: 40px auto;
        padding: 32px 24px;
        border-radius: 16px;
    }
    
    .cart-content h2 {
        font-size: 1.9rem;
        margin-bottom: 24px;
    }
    
    .cart-table th,
    .cart-table td {
        padding: 16px 12px;
        font-size: 0.95rem;
    }
    
    .cart-product-image {
        width: 70px;
        height: 70px;
    }
    
    .cart-qty-input {
        width: 70px;
        padding: 10px 12px;
    }
    
    .cart-actions .btn-remove {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .cart-total {
        padding: 20px 24px;
        font-size: 1.2rem;
        margin: 24px 0 20px;
    }
    
    .btn-update,
    .btn.btn-primary {
        padding: 14px 24px;
        font-size: 1rem;
        margin-right: 12px;
    }
}

@media (max-width: 768px) {
    .cart-content {
        margin: 20px auto;
        padding: 24px 20px;
    }
    
    .cart-content h2 {
        font-size: 1.6rem;
    }
    
    .cart-table {
        border-radius: 12px;
    }
    
    .cart-table th,
    .cart-table td {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
    
    .cart-product-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-qty-input {
        width: 60px;
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .cart-actions .btn-remove {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .cart-total {
        padding: 16px 20px;
        font-size: 1.1rem;
        text-align: center;
    }
    
    .btn-update,
    .btn.btn-primary {
        padding: 12px 20px;
        font-size: 0.95rem;
        margin: 8px 4px;
        width: calc(50% - 8px);
        justify-content: center;
    }
    
    .cart-empty {
        padding: 60px 24px;
        margin: 20px 0;
    }
    
    .cart-empty i {
        font-size: 3.5rem;
    }
    
    .cart-empty p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .cart-content {
        margin: 10px;
        padding: 20px 16px;
    }
    
    .cart-content h2 {
        font-size: 1.4rem;
    }
    
    .cart-table th,
    .cart-table td {
        padding: 10px 6px;
        font-size: 0.85rem;
    }
    
    .cart-product-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-qty-input {
        width: 50px;
        padding: 6px 8px;
    }
    
    .cart-actions .btn-remove {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .cart-total {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    .btn-update,
    .btn.btn-primary {
        padding: 10px 16px;
        font-size: 0.9rem;
        width: 100%;
        margin: 6px 0;
    }
    
    .cart-empty {
        padding: 40px 16px;
    }
    
    .cart-empty i {
        font-size: 3rem;
    }
    
    .cart-empty p {
        font-size: 1rem;
    }
}

/* Off-canvas Cart Responsive */
@media (max-width: 800px) {
    .cart-offcanvas {
        width: 100%;
        right: -100%;
        min-width: unset;
    }
    .cart-header {
        padding: 0.7rem;
    }
    .cart-header h2 {
        font-size: 1.1rem;
    }
    .cart-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    .cart-offcanvas .custom-btn {
        padding: 0.5rem;
        font-size: 0.95rem;
        min-width: 90px;
        height: 36px;
    }
}