/* ============================================
   MUSE INSTITUT - Boutique Styles
   Same magazine theme as main site
   ============================================ */

/* ---- Navbar Boutique ---- */
.navbar-boutique {
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.nav-cart-link,
.nav-cart-link-mobile {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px;
}

.nav-cart-link svg,
.nav-cart-link-mobile svg {
    stroke: var(--text-primary);
}

.cart-badge {
    position: absolute;
    top: 0;
    right: -2px;
    background: var(--wood-medium);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}

.cart-badge.visible {
    opacity: 1;
    transform: scale(1);
}

.nav-right-mobile {
    display: none;
    align-items: center;
    gap: 8px;
}

/* ---- Hero Boutique ---- */
.boutique-hero {
    background: linear-gradient(135deg, var(--cream) 0%, var(--warm-white) 100%);
    padding: 140px 0 60px;
    text-align: center;
}

.boutique-hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.boutique-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.boutique-date {
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ---- Category Filters ---- */
.boutique-filters {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 70px;
    z-index: 50;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 10px 24px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--cream-light);
    border: 1.5px solid transparent;
    white-space: nowrap;
    transition: var(--transition);
}

.filter-tab:hover {
    border-color: var(--wood-light);
    color: var(--wood-dark);
}

.filter-tab.active {
    background: var(--wood-medium);
    color: var(--white);
    border-color: var(--wood-medium);
}

/* ---- Products Grid ---- */
.boutique-products {
    padding: 48px 0 80px;
    min-height: 50vh;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.products-loading,
.products-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.products-empty svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.products-empty h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ---- Product Card ---- */
.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
}

.product-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--cream-light);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.06);
}

.product-card-image .product-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.92);
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--wood-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.product-card-image .product-stock-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.7rem;
    font-weight: 600;
}

.product-stock-tag.in-stock {
    background: rgba(45, 106, 79, 0.9);
    color: white;
}

.product-stock-tag.low-stock {
    background: rgba(230, 170, 50, 0.9);
    color: white;
}

.product-stock-tag.out-of-stock {
    background: rgba(155, 34, 38, 0.9);
    color: white;
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
}

.product-card-body {
    padding: 18px;
}

.product-card-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-card-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card-price {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--wood-medium);
}

.btn-quick-add {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--wood-medium);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-quick-add:hover {
    background: var(--wood-dark);
}

.btn-quick-add:disabled {
    background: var(--border);
    color: var(--text-light);
    cursor: not-allowed;
}

/* ---- Product Modal ---- */
.modal-container.product-modal-container {
    max-width: 800px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.product-modal-container > .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 300;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.product-modal-container > .modal-close:hover {
    background: #fff;
    color: #9b2226;
    box-shadow: 0 2px 14px rgba(0,0,0,0.25);
    transform: scale(1.1);
}

.product-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.product-modal-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--cream-light);
}

.product-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-modal-info {
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.product-modal-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--wood-medium);
    margin-bottom: 8px;
}

.product-modal-info h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.product-modal-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.product-modal-price {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--wood-medium);
    margin-bottom: 12px;
}

.product-modal-stock {
    font-size: 0.82rem;
    margin-bottom: 20px;
}

.product-modal-stock.in-stock {
    color: #2d6a4f;
}

.product-modal-stock.out-of-stock {
    color: #9b2226;
}

.product-modal-qty {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.product-modal-qty label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.qty-controls {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-controls button {
    width: 36px;
    height: 36px;
    background: var(--cream-light);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-controls button:hover {
    background: var(--cream);
}

.qty-controls span {
    width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-add-cart {
    width: 100%;
    padding: 14px;
    background: var(--wood-medium);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background: var(--wood-dark);
}

.btn-add-cart:disabled {
    background: var(--border);
    color: var(--text-light);
    cursor: not-allowed;
}

/* ---- Carousel ---- */
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    color: var(--text-primary);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: var(--transition);
    z-index: 2;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.carousel-arrow:hover {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
}

.carousel-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    background: var(--cream-light);
}

.carousel-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.carousel-thumb.active {
    opacity: 1;
    border-color: var(--wood-medium);
}

.carousel-thumb:hover {
    opacity: 0.8;
}

/* Photo count badge on cards */
.product-photo-count {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

/* ---- Cart Sidebar ---- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background: var(--white);
    z-index: 200;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-strong);
    transition: right 0.35s ease;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.cart-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
}

.cart-close {
    font-size: 1.8rem;
    background: none;
    color: var(--text-secondary);
    line-height: 1;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.cart-empty svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--cream-light);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--wood-medium);
    font-weight: 600;
}

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

.cart-item-controls button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--cream-light);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-controls button:hover {
    background: var(--cream);
}

.cart-item-controls span {
    font-size: 0.88rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    background: none !important;
    color: #9b2226 !important;
    font-size: 1.2rem !important;
    width: auto !important;
    height: auto !important;
}

.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--warm-white);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cart-total span {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.cart-total strong {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-primary);
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    background: var(--wood-medium);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition);
    display: block;
    text-align: center;
}

.btn-checkout:hover {
    background: var(--wood-dark);
}

/* ---- Checkout Modal ---- */
.checkout-modal-container {
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
}

.checkout-content {
    padding: 24px;
}

.checkout-content h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.checkout-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.full-width {
    grid-column: 1 / -1;
}

.checkout-summary {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.88rem;
}

.checkout-summary-item span:first-child {
    color: var(--text-secondary);
}

.checkout-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0;
    margin-top: 8px;
    border-top: 1px solid var(--border-light);
}

.checkout-summary-total span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.checkout-summary-total strong {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--wood-medium);
}

.revolut-widget {
    min-height: 300px;
    padding: 20px 0;
}

.payment-info {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-light);
    margin-top: 12px;
}

.checkout-success {
    text-align: center;
    padding: 40px 20px;
}

.checkout-success svg {
    margin-bottom: 20px;
}

.checkout-success h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.checkout-success p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.order-number {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wood-medium);
    margin: 16px 0 28px !important;
}

/* ---- Footer ---- */
.boutique-footer {
    background: var(--text-primary);
    color: var(--cream);
    padding: 40px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.footer-brand p {
    font-size: 0.82rem;
    color: var(--text-light);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--cream);
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-date {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-light);
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ---- Toast ---- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.35s ease;
    white-space: nowrap;
}

.toast.success {
    background: #2d6a4f;
    color: white;
}

.toast.error {
    background: #9b2226;
    color: white;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nav-right-mobile {
        display: flex;
    }

    .boutique-hero {
        padding: 120px 0 40px;
    }

    .boutique-hero h1 {
        font-size: 2.4rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    #productModal {
        padding: 10px;
    }

    .modal-container.product-modal-container {
        max-width: 96%;
        max-height: 82vh;
        height: 82vh;
        border-radius: 16px;
        overflow: hidden;
    }

    .product-modal-container > .modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 46px;
        height: 46px;
        font-size: 1.8rem;
        background: rgba(0, 0, 0, 0.5);
        color: #fff;
        box-shadow: 0 2px 12px rgba(0,0,0,0.3);
        z-index: 30;
    }

    .product-modal-container > .modal-close:hover {
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
    }

    .product-modal-content {
        display: block;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        height: 82vh;
    }

    .product-modal-image {
        aspect-ratio: 4/3;
        max-height: 40vh;
        flex-shrink: 0;
    }

    .product-modal-info {
        padding: 20px 20px 32px;
    }

    .product-modal-info h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .product-modal-desc {
        font-size: 0.85rem;
        margin-bottom: 14px;
    }

    .product-modal-price {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    .product-modal-stock {
        margin-bottom: 14px;
    }

    .product-modal-qty {
        margin-bottom: 16px;
    }

    .btn-add-cart {
        padding: 16px;
        font-size: 1rem;
    }

    .carousel-thumbs {
        padding: 6px 8px;
    }

    .carousel-thumb {
        width: 44px;
        height: 44px;
    }

    .cart-sidebar {
        width: 100%;
    }

    .checkout-form-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .product-card-body {
        padding: 12px;
    }

    .product-card-name {
        font-size: 0.9rem;
    }

    .product-card-desc {
        display: none;
    }

    .boutique-hero h1 {
        font-size: 2rem;
    }

    .filter-tab {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .product-modal-image {
        aspect-ratio: 1/1;
        max-height: 40vh;
    }

    .product-modal-info {
        padding: 16px;
    }

    .product-modal-info h2 {
        font-size: 1.15rem;
    }

    .product-modal-price {
        font-size: 1.4rem;
    }
}
