/* Cart Page Styles */

/* Cart Icon in Navigation */
.nav-cart {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.nav-cart svg {
    flex-shrink: 0;
}

.nav-cart .cart-count {
    background: #2D7A34;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nav-cart.active .cart-count,
.nav-cart:hover .cart-count {
    background: #fff;
    color: #2D7A34;
}

.cart-section {
    min-height: 60vh;
    padding: 80px 0;
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    margin-top: 40px;
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 20px;
    align-items: center;
    transition: box-shadow 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2D7A34;
}

.cart-item-image svg {
    width: 40px;
    height: 40px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.cart-item-price {
    font-size: 16px;
    color: #2D7A34;
    font-weight: 600;
    margin-bottom: 12px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    color: #2D7A34;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #2D7A34;
    color: #fff;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #1f2937;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.cart-item-total {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: #fee2e2;
}

.remove-btn svg {
    width: 16px;
    height: 16px;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 40px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.empty-cart svg {
    color: #d1d5db;
    margin-bottom: 24px;
}

.empty-cart h2 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 12px;
}

.empty-cart p {
    color: #6b7280;
    margin-bottom: 32px;
}

/* Cart Summary */
.cart-summary {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    color: #6b7280;
}

.summary-row span:last-child {
    font-weight: 600;
    color: #1f2937;
}

.summary-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 20px 0;
}

.summary-total {
    font-size: 20px;
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 20px;
}

.summary-total span {
    color: #1f2937;
}

.summary-note {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 24px;
    font-size: 14px;
    color: #166534;
}

.summary-note svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.summary-note.warning {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.btn-block {
    width: 100%;
    margin-bottom: 12px;
    justify-content: center;
}

/* Custom Alert Modal */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-alert-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-alert {
    background: white;
    border-radius: 20px;
    max-width: 440px;
    width: 90%;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.custom-alert-overlay.active .custom-alert {
    transform: scale(1) translateY(0);
}

.custom-alert-header {
    background: linear-gradient(135deg, #2D7A34 0%, #236B2C 100%);
    padding: 32px 32px 24px 32px;
    text-align: center;
    position: relative;
}

.custom-alert-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.custom-alert-icon svg {
    width: 36px;
    height: 36px;
    stroke: white;
    stroke-width: 2.5;
}

.custom-alert-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-alert-body {
    padding: 32px;
}

.custom-alert-message {
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
    text-align: center;
    margin: 0 0 8px 0;
}

.custom-alert-submessage {
    font-size: 14px;
    line-height: 1.5;
    color: #6b7280;
    text-align: center;
    margin: 0;
}

.custom-alert-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.custom-alert-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
}

.custom-alert-btn:active {
    transform: scale(0.98);
}

.custom-alert-btn-primary {
    background: linear-gradient(135deg, #2D7A34 0%, #236B2C 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(45, 122, 52, 0.3);
}

.custom-alert-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(45, 122, 52, 0.4);
    transform: translateY(-1px);
}

.custom-alert-btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.custom-alert-btn-secondary:hover {
    background: #e5e7eb;
}

/* Responsive */
@media (max-width: 968px) {
    .cart-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 640px) {
    .cart-item {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cart-item-image {
        width: 100%;
        height: 120px;
    }

    .cart-item-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .cart-item-controls {
        order: -1;
    }
}
