:root {
    color-scheme: light;
    --bg: #f4f1ea;
    --card: #fffdf8;
    --ink: #1f2937;
    --muted: #6b7280;
    --accent: #0f766e;
    --accent-dark: #115e59;
    --warm: #c2410c;
    --accent-soft: #ccfbf1;
    --line: #e5e7eb;
    --product-font: "Inter", "Poppins", "Montserrat", "Segoe UI", Arial, sans-serif;
    --media-bg:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92) 58%, rgba(226, 232, 240, 0.9) 100%);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 28%),
        radial-gradient(circle at bottom right, rgba(194, 65, 12, 0.12), transparent 25%),
        var(--bg);
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.store-wrap {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.store-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
    background: rgba(255, 253, 248, 0.9);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.store-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.store-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 6px 10px 6px 6px;
    border-radius: 22px;
    font-size: 1.35rem;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.store-brand:hover {
    background: rgba(255, 255, 255, 0.72);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.store-brand-logo-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 46px;
    padding: 5px 7px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.store-brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.store-brand-name {
    display: block;
    max-width: 220px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.store-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-family: Arial, sans-serif;
}

.store-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    color: #374151;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(229, 231, 235, 0.85);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.store-nav a:hover {
    color: var(--accent-dark);
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.store-main {
    padding: 16px 0 56px;
}

.catalog-section {
    padding-top: 4px;
}

.hero {
    padding: 44px;
    margin-top: 12px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.94), var(--accent));
    color: #f9fafb;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.hero p {
    max-width: 640px;
    color: rgba(249, 250, 251, 0.85);
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.button-primary,
.button-secondary,
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.button-secondary {
    color: var(--ink);
    background: #ffffff;
}

.button-danger {
    color: #ffffff;
    background: #b91c1c;
}

.button-primary:hover,
.button-secondary:hover,
.button-danger:hover {
    transform: translateY(-1px);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 34px 0 18px;
    flex-wrap: wrap;
}

.section-head-copy {
    min-width: 0;
}

.catalog-public-search {
    flex: 1 1 320px;
    display: flex;
    justify-content: center;
}

.catalog-public-search-wrap {
    position: relative;
    width: min(100%, 360px);
}

.catalog-public-search-wrap::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid #94a3b8;
    border-radius: 999px;
    transform: translateY(-60%);
    pointer-events: none;
}

.catalog-public-search-wrap::after {
    content: '';
    position: absolute;
    left: 29px;
    top: calc(50% + 4px);
    width: 8px;
    height: 2px;
    background: #94a3b8;
    transform: rotate(45deg);
    border-radius: 999px;
    pointer-events: none;
}

.catalog-public-search-input {
    width: 100%;
    min-height: 44px;
    padding: 11px 14px 11px 44px;
    border: 1px solid rgba(209, 213, 219, 0.95);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.catalog-public-search-input:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.8);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12), 0 12px 28px rgba(15, 23, 42, 0.08);
}

.catalog-empty-search {
    margin-top: 18px;
    text-align: center;
}

.section-head p,
.meta,
.empty,
.error-box,
.helper-text,
.product-copy,
.summary-line small,
.cart-note {
    color: var(--muted);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.filter-pill {
    display: inline-flex;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    font-family: Arial, sans-serif;
    font-size: 0.92rem;
}

.filter-pill-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card,
.panel,
.empty,
.error-box,
.checkout-grid,
.product-layout {
    background: var(--card);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.card {
    overflow: hidden;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.card-media-link {
    display: block;
}

.media {
    display: grid;
    place-items: center;
    height: clamp(220px, 24vw, 260px);
    padding: 18px;
    background: var(--media-bg);
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
    overflow: hidden;
}

.media-frame {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.56);
}

.media img,
.cart-image img {
    width: auto;
    height: auto;
    max-width: 84%;
    max-height: 84%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 16px 24px rgba(15, 23, 42, 0.12));
}

.media-placeholder,
.product-image-placeholder,
.cart-image-placeholder {
    display: grid;
    place-items: center;
    color: #78716c;
    background: #e7e5e4;
}

.media-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 18px;
}

.content {
    display: grid;
    gap: 18px;
    padding: 22px;
    flex: 1 1 auto;
    font-family: var(--product-font);
    align-content: start;
}

.content h3,
.product-info h1,
.section-title,
.panel h2,
.panel h3 {
    margin: 0;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: var(--product-font);
    font-weight: 700;
}

.card-copy {
    display: grid;
    gap: 12px;
    align-content: start;
}

.content h3 {
    font-size: 1.08rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.content h3 a,
.product-info h1 {
    transition: color 0.2s ease;
}

.card:hover .content h3 a,
.card:hover .price {
    color: var(--accent-dark);
}

.meta,
.product-copy,
.product-description,
.stock {
    font-family: var(--product-font);
}

.meta {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.65;
}

.price-row,
.summary-line,
.inline-between {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.price,
.product-price,
.summary-total {
    font-size: 1.45rem;
    font-weight: 700;
    font-family: var(--product-font);
    letter-spacing: -0.03em;
}

.card-price-copy {
    display: grid;
    gap: 6px;
}

.stock {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.4;
}

.stock-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    border: 1px solid rgba(15, 118, 110, 0.14);
    color: var(--accent-dark);
    font-weight: 600;
}

.card-action {
    min-width: 132px;
}

.card .price-row {
    margin-top: auto;
    align-items: flex-end;
}

.alert,
.empty,
.error-box,
.panel {
    border-radius: 22px;
    padding: 22px;
}

.alert {
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.cart-feedback {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    font-family: Arial, sans-serif;
    font-size: 0.92rem;
}

.cart-feedback-success {
    background: rgba(15, 118, 110, 0.1);
    color: var(--accent-dark);
}

.cart-feedback-error {
    background: #fee2e2;
    color: #991b1b;
}

.product-layout {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
    gap: 28px;
    padding: 28px;
    border-radius: 28px;
    align-items: start;
}

.product-image {
    display: grid;
    gap: 14px;
    border-radius: 24px;
}

.product-image-stage {
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 30px;
    border-radius: 24px;
    overflow: hidden;
    background: var(--media-bg);
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.product-image-stage > img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 24px 34px rgba(15, 23, 42, 0.14));
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border-radius: 20px;
}

.product-info {
    display: grid;
    gap: 18px;
    font-family: var(--product-font);
}

.product-info-header {
    display: grid;
    gap: 12px;
}

.product-info h1 {
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.product-copy {
    margin: 0;
    max-width: 60ch;
    font-size: 1rem;
    line-height: 1.75;
}

.product-meta-row {
    align-items: center;
}

.product-gallery-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(78px, 92px));
    gap: 10px;
    padding: 0;
    justify-content: start;
}

.product-gallery-thumb {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    padding: 10px;
    border: 2px solid transparent;
    overflow: hidden;
    border-radius: 16px;
    background: var(--media-bg);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-gallery-thumb:hover {
    transform: translateY(-1px);
}

.product-gallery-thumb-active {
    border-color: rgba(15, 118, 110, 0.7);
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
}

.product-gallery-thumb img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-description {
    line-height: 1.7;
    font-size: 0.97rem;
    color: #374151;
}

.product-attributes {
    display: grid;
    gap: 14px;
}

.product-attributes strong {
    display: inline-block;
    margin-bottom: 8px;
}

.product-attribute-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-chip {
    position: relative;
    display: inline-flex;
}

.variant-chip input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.variant-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #ffffff;
    color: #334155;
    font-family: var(--product-font);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.variant-chip input:checked + span {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.18);
}

.variant-chip input:focus-visible + span {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.16);
}

.variant-chip:hover span {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.35);
}

.variant-chip-color span {
    min-width: 92px;
}

.variant-chip-neutral span {
    background: #f8fafc;
    border-style: dashed;
}

.purchase-box,
.summary-box {
    padding: 18px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid var(--line);
    font-family: var(--product-font);
}

.quantity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.quantity-row input,
.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 12px 14px;
    background: #ffffff;
}

.quantity-row input {
    max-width: 120px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--product-font);
}

.cart-image,
.cart-image-placeholder {
    width: 78px;
    height: 78px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--media-bg);
    padding: 8px;
    border: 1px solid rgba(226, 232, 240, 0.92);
}

.cart-image img {
    filter: none;
}

.cart-table,
.summary-box,
.quantity-row,
.form-group label,
.form-group input,
.form-group textarea,
.form-group select {
    font-family: var(--product-font);
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    gap: 24px;
    padding: 28px;
    border-radius: 28px;
}

.summary-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-box li + li {
    margin-top: 12px;
}

.summary-line small {
    display: block;
    margin-top: 4px;
}

.summary-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.success-card {
    padding: 28px;
    border-radius: 28px;
    background: var(--card);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.store-footer {
    border-top: 1px solid rgba(229, 231, 235, 0.8);
    background: rgba(255, 253, 248, 0.9);
}

.store-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
}

.store-footer-promo {
    min-width: 0;
}

.store-footer-promo a {
    display: inline-block;
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
    color: var(--muted);
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.store-footer-promo a:hover {
    color: var(--accent-dark);
    opacity: 1;
}

.store-footer-side {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.store-footer-social-label {
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.9;
}

.store-social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.store-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.74);
    color: #374151;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.store-social-link:hover {
    color: var(--accent-dark);
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.store-social-link svg {
    width: 17px;
    height: 17px;
    display: block;
}

@media (max-width: 900px) {
    .store-header-inner,
    .section-head,
    .price-row,
    .summary-line,
    .inline-between,
    .product-layout,
    .checkout-grid,
    .store-footer-inner {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

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

    .store-header-inner {
        padding: 10px 0;
        gap: 12px;
    }

    .store-brand {
        gap: 10px;
        padding: 4px 0 2px;
        font-size: 1.1rem;
        border-radius: 0;
        box-shadow: none;
    }

    .store-brand-logo-shell {
        width: 56px;
        height: 40px;
        padding: 4px 6px;
        border-radius: 14px;
    }

    .store-brand-logo {
        max-width: 100%;
        max-height: 100%;
    }

    .store-brand-name {
        max-width: none;
    }

    .store-nav {
        justify-content: center;
        gap: 10px;
    }

    .store-nav a {
        justify-content: center;
        min-height: 40px;
        padding: 0 12px;
    }

    .hero {
        padding: 28px;
    }

    .content {
        padding: 20px;
    }

    .price-row {
        gap: 14px;
    }

    .card-action {
        width: 100%;
    }

    .catalog-public-search {
        width: 100%;
        justify-content: stretch;
    }

    .catalog-public-search-wrap {
        width: 100%;
    }

    .product-gallery-inline {
        grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
    }

    .product-image-stage {
        min-height: 300px;
        padding: 24px;
    }

    .store-footer-side {
        justify-items: start;
    }

    .store-footer-promo {
        order: 2;
    }

    .store-social-links {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .store-wrap {
        width: min(100% - 24px, 1120px);
    }

    .store-header-inner {
        align-items: center;
        padding: 10px 0 8px;
    }

    .store-brand {
        justify-content: center;
        width: 100%;
        font-size: 1.02rem;
    }

    .store-brand-logo-shell {
        width: 60px;
        height: 42px;
    }

    .store-brand-name {
        max-width: 180px;
    }

    .store-nav {
        width: 100%;
        justify-content: center;
    }

    .store-nav a {
        flex: 1 1 auto;
        min-width: 92px;
    }

    .media {
        height: 220px;
        padding: 16px;
    }

    .media-frame {
        padding: 14px;
    }

    .product-info h1 {
        font-size: 1.7rem;
    }

    .store-footer-inner {
        gap: 12px;
        padding: 14px 0;
    }

    .store-social-link {
        width: 36px;
        height: 36px;
    }
}
