/**
 * ============================================
 * PHILIPPE ARGENTO - MINI CART PREMIUM STYLES
 * ============================================
 *
 * Premium glassmorphism design for cart dropdown
 * - Bézs tónusok
 * - Glassmorphism effekt
 * - Kerekített sarkok (18-22px)
 * - Finom árnyékok
 * - Elegáns termék kártyák
 *
 * @version 1.0.0
 * @date 2025-12-04
 */

:root {
    --pa-mini-cart-bg: rgba(255, 255, 255, 0.85);
    --pa-mini-cart-header: #F4F1EB;
    --pa-mini-cart-divider: #E8E6E2;
    --pa-mini-cart-text: #2d3748;
    --pa-mini-cart-text-muted: #718096;
    --pa-mini-cart-primary: #1E2615;
}

/* ============================================
   CART DROPDOWN CONTAINER
   ============================================ */

.cart-dropdown .dropdown-menu {
    background: var(--pa-mini-cart-bg) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-radius: 22px !important;
    border: 1px solid rgba(179, 168, 156, 0.2) !important;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06) !important;
    padding: 0 !important;
    min-width: 380px !important;
    max-width: 420px !important;
    margin-top: 12px !important;
}

@media (max-width: 576px) {
    .cart-dropdown .dropdown-menu {
        min-width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 18px 18px 0 0 !important;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        transform: none !important;
    }
}

/* ============================================
   CART HEADER
   ============================================ */

.cart-dropdown .dropdown-header {
    background: linear-gradient(135deg, var(--pa-mini-cart-header) 0%, rgba(244, 241, 235, 0.6) 100%) !important;
    border-bottom: 1px solid var(--pa-mini-cart-divider) !important;
    border-radius: 22px 22px 0 0 !important;
    padding: 20px 24px !important;
}

.cart-dropdown .dropdown-header h6 {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--pa-mini-cart-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.cart-dropdown .dropdown-header i {
    font-size: 1.2rem;
    color: var(--pa-mini-cart-primary);
    opacity: 0.8;
}

/* ============================================
   CART BODY (ITEMS CONTAINER)
   ============================================ */

.cart-dropdown .dropdown-body {
    padding: 24px !important;
    max-height: 420px !important;
    overflow-y: auto !important;
}

/* Custom scrollbar */
.cart-dropdown .dropdown-body::-webkit-scrollbar {
    width: 6px;
}

.cart-dropdown .dropdown-body::-webkit-scrollbar-track {
    background: rgba(232, 230, 226, 0.3);
    border-radius: 10px;
}

.cart-dropdown .dropdown-body::-webkit-scrollbar-thumb {
    background: rgba(179, 168, 156, 0.4);
    border-radius: 10px;
}

.cart-dropdown .dropdown-body::-webkit-scrollbar-thumb:hover {
    background: rgba(179, 168, 156, 0.6);
}

/* Empty cart state */
.cart-dropdown .dropdown-body .text-center {
    padding: 40px 20px !important;
}

.cart-dropdown .dropdown-body .text-center i {
    font-size: 3rem;
    color: var(--pa-mini-cart-text-muted);
    opacity: 0.5;
    margin-bottom: 16px;
}

/* ============================================
   CART ITEM CARDS
   ============================================ */

.mini-cart-item {
    display: flex;
    align-items: flex-start;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--pa-mini-cart-divider) !important;
    transition: all 250ms ease;
}

.mini-cart-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none !important;
}

.mini-cart-item:hover {
    transform: translateX(4px);
}

/* Product image */
.mini-cart-item img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover;
    border-radius: 12px !important;
    border: 1px solid var(--pa-mini-cart-divider) !important;
    margin-right: 16px !important;
    flex-shrink: 0;
}

/* Product info */
.mini-cart-item .flex-grow-1 {
    flex: 1;
}

.mini-cart-item .fw-semibold {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pa-mini-cart-text);
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-cart-item .text-muted {
    font-size: 0.85rem;
    color: var(--pa-mini-cart-text-muted) !important;
}

/* Product price */
.mini-cart-item .fw-bold {
    font-weight: 700 !important;
    font-size: 1rem;
    color: var(--pa-mini-cart-primary);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 12px;
}

/* Variant badge (if exists) */
.mini-cart-item .variant-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(179, 168, 156, 0.15);
    color: var(--pa-mini-cart-text);
    margin-top: 4px;
}

/* Remove button (if added later) */
.mini-cart-item .btn-remove {
    background: none;
    border: none;
    color: var(--pa-mini-cart-text-muted);
    padding: 4px 8px;
    cursor: pointer;
    transition: all 200ms ease;
    border-radius: 6px;
}

.mini-cart-item .btn-remove:hover {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
}

/* ============================================
   CART FOOTER
   ============================================ */

.cart-dropdown .dropdown-footer {
    background: rgba(244, 241, 235, 0.4);
    border-top: 1px solid var(--pa-mini-cart-divider) !important;
    border-radius: 0 0 22px 22px !important;
    padding: 24px !important;
}

/* Subtotal section (if added) */
.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px 0;
    border-top: 2px solid var(--pa-mini-cart-divider);
    border-bottom: 2px solid var(--pa-mini-cart-divider);
}

.cart-subtotal .label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--pa-mini-cart-text);
}

.cart-subtotal .amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pa-mini-cart-primary);
}

/* Premium CTA button */
.cart-dropdown .dropdown-footer .btn {
    background: var(--pa-mini-cart-primary) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 16px 28px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    transition: all 300ms cubic-bezier(0.23, 0.65, 0.25, 0.95) !important;
    box-shadow: 0 4px 12px rgba(30, 38, 21, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cart-dropdown .dropdown-footer .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cart-dropdown .dropdown-footer .btn:hover::before {
    width: 300px;
    height: 300px;
}

.cart-dropdown .dropdown-footer .btn:hover {
    background: #2a3620 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 38, 21, 0.3);
}

.cart-dropdown .dropdown-footer .btn:active {
    transform: translateY(0);
}

.cart-dropdown .dropdown-footer .btn i {
    font-size: 1.1rem;
    vertical-align: middle;
}

/* ============================================
   LOADING STATE
   ============================================ */

.cart-dropdown .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
    color: var(--pa-mini-cart-primary) !important;
}

.cart-dropdown .text-muted.small {
    color: var(--pa-mini-cart-text-muted) !important;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .cart-dropdown .dropdown-menu {
        min-width: 340px !important;
    }

    .cart-dropdown .dropdown-header,
    .cart-dropdown .dropdown-body,
    .cart-dropdown .dropdown-footer {
        padding: 18px !important;
    }

    .mini-cart-item img {
        width: 60px !important;
        height: 60px !important;
    }
}

@media (max-width: 576px) {
    .cart-dropdown .dropdown-header,
    .cart-dropdown .dropdown-footer {
        padding: 20px !important;
    }

    .cart-dropdown .dropdown-body {
        max-height: 60vh !important;
    }
}

/* ============================================
   ANIMATION
   ============================================ */

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-dropdown .dropdown-menu.show {
    animation: slideInDown 0.3s cubic-bezier(0.23, 0.65, 0.25, 0.95);
}
