/* Shop storefront */
.shop-body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Header */
.shop-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.shop-brand {
    text-decoration: none;
    color: inherit;
}
.shop-brand:hover .shop-brand-icon {
    background: #4338ca;
    transform: scale(1.05);
}
.shop-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    transition: transform 0.2s, background 0.2s;
}
.shop-nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}
.shop-nav-link:hover {
    color: #4f46e5;
    background: #f1f5f9;
}
.shop-cart-btn {
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}
.shop-cart-btn:hover {
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

/* Hero */
.shop-hero {
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #6366f1 100%);
    position: relative;
    overflow: hidden;
}
.shop-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%);
    pointer-events: none;
}
.shop-hero-content {
    position: relative;
    z-index: 1;
}
.shop-hero-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #c7d2fe;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.1);
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.15);
}
.shop-hero-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}
.shop-hero-desc {
    font-size: 1.0625rem;
    color: #e0e7ff;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.shop-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}
.shop-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
}

/* Section — legacy */
.shop-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.shop-section-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.shop-section-subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Catalog section */
.shop-catalog-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
    margin-bottom: 2.5rem;
}
.shop-catalog-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}
.shop-catalog-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6366f1;
    margin-bottom: 0.25rem;
}
.shop-catalog-title {
    font-size: clamp(1.5rem, 4vw, 1.875rem);
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.shop-catalog-count {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
}
.shop-catalog-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.25rem;
}
@media (min-width: 640px) {
    .shop-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .shop-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.shop-catalog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
    font-weight: 600;
    background: #f8fafc;
    border-radius: 1rem;
    border: 1px dashed #cbd5e1;
}

/* Filters */
.shop-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.shop-filter-toggle:hover {
    color: #4f46e5;
    border-color: #c7d2fe;
    background: #f8fafc;
}
.shop-filter-toggle[aria-expanded="true"] {
    color: #4f46e5;
    border-color: #a5b4fc;
    background: #eef2ff;
}
.shop-filter-toggle[aria-expanded="true"] {
    color: #4f46e5;
    border-color: #a5b4fc;
    background: #eef2ff;
}
.shop-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: #4f46e5;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 800;
}
.shop-filter-chips:empty {
    display: none;
}
.shop-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 700;
}
.shop-filter-chip button {
    color: #6366f1;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.shop-filter-reset {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    background: none;
    border: 0;
    cursor: pointer;
    text-decoration: underline;
}
.shop-min-order-sticky {
    position: sticky;
    top: 4.25rem;
    z-index: 30;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    box-shadow: 0 4px 12px rgba(154, 52, 18, 0.08);
}
.shop-lot-gallery {
    position: relative;
}
.shop-lot-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 0.875rem 0.875rem 0 0;
}
.shop-lot-zoom-btn {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 0;
    background: rgba(255,255,255,0.92);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15,23,42,0.12);
    z-index: 2;
}
.shop-lot-zoom-btn:hover {
    color: #4f46e5;
}
.shop-lot-thumbs {
    display: flex;
    gap: 0.35rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.shop-lot-thumb {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    background: #fff;
}
.shop-lot-thumb.active {
    border-color: #6366f1;
}
.shop-lot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.shop-lot-thumb-more {
    display: flex;
    align-items: center;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #64748b;
    padding: 0 0.25rem;
}
.shop-lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(15,23,42,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.shop-lightbox.hidden {
    display: none;
}
.shop-lightbox-img {
    max-width: min(100%, 56rem);
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
}
.shop-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.shop-thanks-steps ol {
    list-style: none;
    padding: 0;
    margin: 0;
}
.shop-thanks-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}
.shop-filters {
    padding: 1.125rem 1.25rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
}
.shop-filters .label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.375rem;
}

/* Banners */
.shop-banner {
    padding: 0.875rem 1.125rem;
    border-radius: 0.875rem;
    font-size: 0.875rem;
    line-height: 1.5;
}
.shop-banner-discount {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    color: #312e81;
}
.shop-banner-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

/* Category bar */
.shop-category-bar {
    padding: 0.25rem;
    background: #fff;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}
.shop-cat-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.shop-cat-btn:hover {
    color: #4f46e5;
    background: #f1f5f9;
}
.shop-cat-btn.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* Product cards */
.shop-lot-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    position: relative;
}
.shop-lot-card:hover {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    transform: translateY(-3px);
    border-color: #c7d2fe;
}
.shop-lot-img-link {
    display: block;
    overflow: hidden;
}
.shop-lot-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.5rem;
}
.shop-lot-title {
    font-size: 1.0625rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.3;
    margin: 0;
}
.shop-lot-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    flex: 1;
}
.shop-lot-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.shop-lot-eta {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
}
.shop-lot-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
}
.shop-lot-price {
    font-size: 1.125rem;
    font-weight: 900;
    color: #4f46e5;
    white-space: nowrap;
}
.shop-lot-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.shop-lot-img {
    aspect-ratio: 1/1;
    /* Щоб фото не "обрізалось" (користувач бачив повний кадр) */
    object-fit: contain;
    background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
    display: block;
}
.shop-lot-img-placeholder {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
}
.shop-lot-video {
    aspect-ratio: 4/3;
    object-fit: cover;
    background: #0f172a;
    width: 100%;
}
.shop-lot-thumb-video {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #1e293b;
    color: #fff;
    font-size: 0.875rem;
}
.shop-lot-category {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6366f1;
    background: #eef2ff;
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.shop-add-btn {
    gap: 0.25rem;
}
.shop-lot-title-link,
.shop-lot-img-link { text-decoration: none; color: inherit; }
.shop-lot-title-link:hover { color: #4338ca; }

/* Quantity stepper */
.shop-qty-control {
    display: inline-flex;
    align-items: stretch;
    border: 2px solid #4f46e5;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #eef2ff;
}
.shop-qty-control--lg {
    border-radius: 0.875rem;
}
.shop-qty-control--lg .shop-qty-btn {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.125rem;
}
.shop-qty-control--lg .shop-qty-input {
    width: 3rem;
    font-size: 1rem;
}
.shop-qty-control--cart {
    flex-shrink: 0;
}
.shop-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    font-weight: 800;
    font-size: 1rem;
    color: #4f46e5;
    cursor: pointer;
    transition: background 0.15s;
}
.shop-qty-btn:hover:not(:disabled) { background: #e0e7ff; }
.shop-qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.shop-qty-input {
    width: 2.5rem;
    text-align: center;
    border: none;
    border-left: 1px solid #c7d2fe;
    border-right: 1px solid #c7d2fe;
    background: #fff;
    font-weight: 800;
    font-size: 0.875rem;
    color: #312e81;
    -moz-appearance: textfield;
    padding: 0;
}
.shop-qty-input::-webkit-outer-spin-button,
.shop-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Cart drawer lines */
.shop-cart-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    border-radius: 0.875rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.shop-cart-line-info {
    flex: 1;
    min-width: 0;
}
.shop-cart-min-warn {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0.875rem;
    margin-bottom: 0.75rem;
    border-radius: 0.75rem;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 0.8125rem;
    line-height: 1.45;
}
.shop-cart-min-warn strong {
    font-size: 0.875rem;
    color: #c2410c;
}
.shop-cart-min-note {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
#checkout-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}
.shop-cart-warn {
    font-size: 0.8125rem;
    color: #dc2626;
    font-weight: 600;
}
.shop-checkout-error {
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.45;
}

/* Stock badges */
.stock-badge-in {
    background: #ecfdf5;
    color: #059669;
}
.stock-badge-out {
    background: #fff7ed;
    color: #c2410c;
}
.stock-badge-low {
    background: #fef3c7;
    color: #b45309;
}

/* Custom order section */
.shop-custom-section {
    border: 2px dashed #c7d2fe;
    background: linear-gradient(180deg, #fff 0%, #fafaff 100%);
}
.shop-custom-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.shop-custom-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: 0.875rem;
    color: #4f46e5;
}

/* Cart */
#cart-drawer {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#cart-drawer.open {
    transform: translateX(0);
}
.shop-cart-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: background 0.15s;
}
.shop-cart-close:hover {
    background: #e2e8f0;
}
.shop-np-suggest {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    margin-top: 0.25rem;
    max-height: 220px;
    overflow-y: auto;
}
.shop-np-item {
    width: 100%;
    text-align: left;
    padding: 0.625rem 0.75rem;
    border: 0;
    background: #fff;
    cursor: pointer;
}
.shop-np-item:hover { background: #f8fafc; }
.shop-photo-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}
.shop-gallery-thumb {
    border: 2px solid transparent;
    border-radius: 0.625rem;
}
.shop-gallery-thumb.active { border-color: #6366f1; }

/* Footer */
.shop-footer {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    margin-top: auto;
}
.shop-footer-link {
    color: #c7d2fe;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}
.shop-footer-link:hover {
    color: #fff;
}

/* Success modal */
.shop-success-modal {
    animation: shop-pop 0.3s ease-out;
}
@keyframes shop-pop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Loading skeleton */
.shop-loading .shop-lot-card {
    pointer-events: none;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 640px) {
    .shop-catalog-section {
        padding: 1.125rem;
        border-radius: 1rem;
    }
    .shop-catalog-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .shop-category-bar {
        border-radius: 1rem;
        width: 100%;
    }
    .shop-lot-footer {
        flex-wrap: wrap;
    }
}
