/* ============================================================
   Boutique Page - Auth, Cart, Products, Toast
   ============================================================ */

/* Boutique Page Layout */
.boutique-page {
    max-width: 1200px;
    margin-top: 100px;
    margin-bottom: 40px;
    align-self: flex-start;
}

/* Allow scrolling on content pages */
body.page-boutique,
body.page-content {
    height: auto !important;
    min-height: 100vh;
}

body.page-boutique main,
body.page-content main {
    align-items: flex-start !important;
}

/* Auth Bar */
.auth-bar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 24px;
}

.auth-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.auth-text {
    color: #aaa;
    font-size: 0.95rem;
    margin: 0;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
}

.auth-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.auth-username {
    font-weight: 600;
    font-size: 1rem;
    display: block;
}

.auth-badge {
    font-size: 0.75rem;
    color: #aaa;
    display: block;
    margin-top: 2px;
}

/* Shop Filters */
.shop-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-chip:hover {
    background: rgba(8, 40, 113, 0.2);
    border-color: var(--primary-color);
    color: #fff;
}

.filter-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 15px rgba(8, 40, 113, 0.4);
}

/* Shop Loading */
.shop-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.shop-loading p {
    color: #aaa;
    font-size: 0.95rem;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: boutique-spin 0.7s linear infinite;
}

@keyframes boutique-spin {
    to { transform: rotate(360deg); }
}

/* Product Cards */
.shop-card-img {
    width: 100%;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.shop-card:hover .shop-card-img img {
    transform: scale(1.05);
}

.shop-card-img-placeholder {
    background: rgba(8, 40, 113, 0.1);
}

.shop-card-body {
    text-align: left;
}

.shop-card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    font-weight: 600;
    opacity: 0.8;
}

.shop-card-title {
    font-family: 'Homenaje', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    margin: 6px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-card-desc {
    font-size: 0.85rem;
    color: #999;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.shop-card-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.shop-card-original-price {
    text-decoration: line-through;
    color: #666;
    font-size: 1rem;
    margin-right: 8px;
}

.shop-card-sale-price {
    color: #e74c3c;
}

.btn-add-cart {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-color);
    border: none;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background: #1a50a6;
    box-shadow: 0 0 20px rgba(8, 40, 113, 0.5);
    transform: translateY(-2px);
}

/* Cart Overlay & Sidebar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100%;
    background: #0a0a0a;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.35s ease;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-header h2 {
    font-family: 'Homenaje', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
    border: none;
    padding: 0;
}

.cart-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.cart-close:hover {
    color: #fff;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.cart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
    font-size: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    display: block;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 2px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    flex-shrink: 0;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

.cart-qty-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.cart-qty {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-remove-btn {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
    transition: opacity 0.2s;
}

.cart-remove-btn:hover {
    opacity: 0.7;
}

.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-coupon {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.cart-coupon input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.85rem;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.cart-coupon input:focus {
    border-color: var(--primary-color);
}

.cart-coupon input::placeholder {
    color: #555;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 700;
}

.cart-checkout-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Floating Cart Button */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(8, 40, 113, 0.5);
    z-index: 900;
    transition: all 0.3s ease;
}

.floating-cart:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 30px rgba(8, 40, 113, 0.7);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 280px;
    max-width: 400px;
    font-size: 0.9rem;
    color: #fff;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.toast.show {
    transform: translateX(0);
}

.toast button {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.3rem;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
}

.toast-success {
    border-left: 3px solid #2ecc71;
}

.toast-error {
    border-left: 3px solid #e74c3c;
}

.toast-info {
    border-left: 3px solid var(--primary-color);
}

/* ============================================================
   Boutique Responsive
   ============================================================ */
@media (max-width: 768px) {
    .auth-state {
        flex-direction: column;
        text-align: center;
    }

    .auth-bar {
        padding: 14px 16px;
    }

    .shop-filters {
        justify-content: center;
    }

    .filter-chip {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .shop-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .shop-card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .btn-add-cart {
        justify-content: center;
    }

    .floating-cart {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .toast {
        min-width: auto;
        max-width: 90vw;
        right: 5%;
    }

    .toast-container {
        right: 10px;
        left: 10px;
    }

    .cart-sidebar {
        width: 100%;
        max-width: 100vw;
    }
}
