/* ===== LOADER ===== */

.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 41, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.loader.active {
    display: flex;
}

.loader-content {
    text-align: center;
    min-width: 320px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 188, 212, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 1rem;
}

.loader-progress-track {
    width: min(380px, 80vw);
    height: 8px;
    margin: 1rem auto 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.loader-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #00BCD4 0%, #FFB800 100%);
    box-shadow: 0 0 12px rgba(0, 188, 212, 0.45);
    transition: width 0.08s linear;
}

.loader-progress-value {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

/* ===== NOTIFICATIONS ===== */

.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(10, 25, 41, 0.95);
    color: var(--text-light);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    animation: slideInRight 0.3s ease;
    z-index: 9999;
}

.notification.success {
    border-left-color: #4CAF50;
}

.notification.error {
    border-left-color: #F44336;
}

.notification.warning {
    border-left-color: #FF9800;
}

.notification.info {
    border-left-color: var(--primary);
}

/* ===== CUSTOM MODAL ===== */

.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.custom-modal.active {
    display: flex;
}

.custom-modal-content {
    background: linear-gradient(135deg, #132F4C, #0A1929);
    padding: 2rem;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.3s ease;
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-modal-header h2 {
    margin: 0;
}

.custom-modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.custom-modal-close:hover {
    color: var(--primary);
}

.custom-modal-body {
    margin-bottom: 2rem;
}

.custom-modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ===== SWIPER ===== */

.swiper {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

/* Fallback layout in case Swiper core CSS is not applied */
.swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.swiper-slide {
    height: auto;
    flex-shrink: 0;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
}

.swiper-pagination-bullet-active {
    background: var(--primary);
}

/* ===== PRODUCT CARD ===== */

.product-card {
    background: rgba(19, 47, 76, 0.8);
    border: 1px solid rgba(0, 188, 212, 0.2);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    border-color: rgba(0, 188, 212, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 188, 212, 0.2);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.2);
}

.product-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.product-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.product-quantity {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.product-quantity button {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.product-quantity button:hover {
    color: var(--primary);
}

.product-quantity input {
    width: 50px;
    border: none;
    background: none;
    color: var(--text-light);
    text-align: center;
    font-weight: 600;
}

/* ===== CART TABLE ===== */

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    overflow: hidden;
}

.cart-table th {
    background: rgba(0, 188, 212, 0.1);
    padding: 1rem;
    text-align: left;
    color: var(--text-light);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.cart-table tr:hover {
    background: rgba(0, 188, 212, 0.05);
}

/* ===== BADGE ===== */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: rgba(0, 188, 212, 0.2);
    color: var(--primary);
}

.badge-secondary {
    background: rgba(255, 184, 0, 0.2);
    color: var(--secondary);
}

.badge-success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.badge-danger {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

/* ===== RADIO & CHECKBOX ===== */

input[type="radio"],
input[type="checkbox"] {
    accent-color: var(--primary);
    cursor: pointer;
}

/* ===== TABLES ===== */

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
}

th {
    background: rgba(0, 188, 212, 0.1);
    padding: 1rem;
    text-align: left;
    color: var(--text-light);
    font-weight: 600;
    border-bottom: 2px solid rgba(0, 188, 212, 0.2);
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

tr:hover {
    background: rgba(0, 188, 212, 0.05);
}

/* ===== DIVIDER ===== */

.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 2rem 0;
}
