@import url('color.css');

:root {
    --store-bg: #f8f8f7;
    --store-surface: #ffffff;
    --store-border: #e7e7e4;
    --store-text: #222222;
    --store-muted: #6b7280;
    --store-primary: #1f4f4b;
    --store-primary-hover: #173e3b;
    --store-accent: #b87a2b;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--store-bg);
    color: var(--store-text);
}

.store-main {
    min-height: calc(100vh - 220px);
}

a {
    color: var(--store-primary);
    transition: color 0.2s ease;
}

    a:hover {
        color: var(--store-primary-hover);
    }

.btn {
    border-radius: 0.7rem;
}

.btn-primary {
    color: #fff;
    background-color: var(--store-primary);
    border-color: var(--store-primary);
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--store-primary-hover);
        border-color: var(--store-primary-hover);
    }

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.15rem #fff, 0 0 0 0.3rem rgba(31, 79, 75, 0.25);
    border-color: rgba(31, 79, 75, 0.45);
}

.store-header .store-topbar {
    background: #fcfcfb;
}

.store-logo {
    height: 38px;
    width: auto;
    border-radius: 0.4rem;
}

.brand-wordmark {
    letter-spacing: 0.02em;
    font-weight: 700;
}

.store-header .navbar {
    background: var(--store-surface);
}

.store-header .nav-link {
    color: var(--store-text);
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 0.5rem;
}

    .store-header .nav-link:hover,
    .store-header .nav-link:focus,
    .store-header .nav-link.active {
        color: var(--store-primary);
        background: #f4f7f7;
    }

.store-search {
    width: 100%;
    max-width: 26rem;
}

    .store-search .input-group-text,
    .store-search .form-control {
        border-color: var(--store-border);
    }

    .store-search .form-control {
        border-left: 0;
    }

    .store-search .input-group-text {
        color: var(--store-muted);
    }

.store-footer {
    border-color: var(--store-border) !important;
}

.footer-links li + li {
    margin-top: 0.35rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--store-muted);
}

    .footer-links a:hover {
        color: var(--store-primary);
    }

.store-card {
    border: 1px solid var(--store-border);
    border-radius: 1rem;
    background: var(--store-surface);
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
}

    .store-card:hover {
        box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
    }

.store-product-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: #fff;
    border-radius: 0.5rem;
}

@media (max-width: 575.98px) {
    .store-product-image {
        height: 120px;
    }
}

.store-section-title {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.store-hero {
    background: linear-gradient(110deg, #fff 0%, #f1f4f3 100%);
    border: 1px solid var(--store-border);
    border-radius: 1.25rem;
    overflow: hidden;
}

.store-hero-banner {
    width: 100%;
    min-height: 220px;
    object-fit: cover;
}

.store-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.9rem;
}

.store-category-tile {
    display: block;
    border: 1px solid var(--store-border);
    border-radius: 0.9rem;
    background: #fff;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .store-category-tile:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
    }

    .store-category-tile .tile-label {
        padding: 0.65rem 0.75rem;
        font-weight: 600;
        font-size: 0.95rem;
    }

.policy-page {
    background: var(--store-surface);
    border: 1px solid var(--store-border);
    border-radius: 1rem;
    padding: 1.5rem;
}

@media (max-width: 991.98px) {
    .brand-wordmark {
        font-size: 1rem;
    }

    .store-search {
        max-width: 100%;
        margin-top: 0.5rem;
    }

    .store-header .navbar-collapse {
        padding-top: 0.35rem;
    }
}

@media (max-width: 767.98px) {
    .store-logo {
        height: 32px;
    }

    .store-hero-banner {
        min-height: 170px;
    }

    .store-product-image {
        height: 190px;
    }

    .policy-page {
        padding: 1rem;
    }
}

.product-page {
    max-width: 1600px;
    margin: 0 auto;
}

.product-description {
    max-width: 320px;
    max-height: 80px;
    overflow: hidden;
    color: var(--bs-secondary-color);
    font-size: .875rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

    .product-description p {
        margin-bottom: .25rem;
    }

.product-pricing {
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.product-images {
    max-width: 260px;
    max-height: 180px;
    overflow: auto;
}

    .product-images img {
        max-width: 85px;
        max-height: 85px;
        width: auto;
        height: auto;
        object-fit: cover;
        border-radius: .375rem;
    }

.product-table {
    table-layout: fixed;
    width: 100%;
}

    .product-table th,
    .product-table td {
        padding: .85rem;
        vertical-align: top;
        overflow-wrap: anywhere;
    }

.product-name {
    font-weight: 600;
    text-decoration: none;
}

    .product-name:hover {
        text-decoration: underline;
    }

.product-card {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    background: var(--bs-body-bg);
    overflow: hidden;
}

    .product-card .product-description {
        max-width: 100%;
        max-height: 90px;
    }

    .product-card .product-images {
        max-width: 100%;
        max-height: 220px;
    }

        .product-card .product-images img {
            max-width: 110px;
            max-height: 110px;
        }

.product-card-label {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .035em;
    color: var(--bs-secondary-color);
    margin-bottom: .35rem;
}

.product-actions {
    display: flex;
    gap: .4rem;
    flex-wrap: nowrap;
}

    .product-actions .btn {
        white-space: nowrap;
    }

.product-toolbar {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: 1rem;
}

.product-search {
    max-width: 420px;
}

@media (max-width: 767.98px) {
    .product-toolbar {
        padding: .75rem;
    }

    .product-search {
        max-width: 100%;
        width: 100%;
    }

    .product-toolbar-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
        width: 100%;
    }

        .product-toolbar-actions .btn {
            width: 100%;
        }

            .product-toolbar-actions .btn:first-child {
                grid-column: 1 / -1;
            }

    .product-card .card-body {
        padding: 1rem;
    }

    .product-card .product-actions .btn {
        flex: 1;
        padding: .6rem;
    }
}

/* 404 page */
.notfound-card {
    max-width: 760px;
    margin: 0 auto;
}

.notfound-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(31, 79, 75, 0.12);
    color: var(--store-primary);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.landing-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bs-body-bg);
}

.landing-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}

.landing-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    font-size: 1.15rem;
    flex-shrink: 0;
}

#about-editor {
    height: 230px;
    overflow-y: auto;
    font-size: .95rem;
}

.ql-toolbar.ql-snow {
    border-radius: 8px 8px 0 0;
    border-color: var(--bs-border-color);
}

.ql-container.ql-snow {
    border-radius: 0 0 8px 8px;
    border-color: var(--bs-border-color);
}

.landing-image-preview {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 1px dashed var(--bs-border-color);
    border-radius: 10px;
    background: var(--bs-tertiary-bg);
}

    .landing-image-preview img {
        max-width: 100%;
        max-height: 230px;
        object-fit: contain;
    }

.landing-live-preview {
    min-height: 100px;
    max-height: 220px;
    overflow-y: auto;
    overflow-wrap: anywhere;
    padding: 15px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-tertiary-bg);
}

    .landing-live-preview img {
        max-width: 100%;
        height: auto;
    }

.landing-save-bar {
    position: sticky;
    bottom: 12px;
    z-index: 1020;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
}

@media (max-width: 767.98px) {
    #about-editor {
        height: 190px;
    }

    .landing-save-bar {
        bottom: 0;
        border-radius: 10px 10px 0 0;
    }
}

/* Product editor — Bootstrap 5, responsive Razor Pages form */
.product-editor {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
}

    .product-editor .card {
        border-radius: .75rem;
        border-color: var(--store-border);
    }

    .product-editor .card-header {
        padding: .75rem 1rem;
    }

        .product-editor .card-header h2 {
            font-size: 1rem;
        }

    .product-editor .card-body {
        padding: 1.25rem;
        font-size: .95rem;
    }

    .product-editor .form-label {
        font-size: .875rem;
        margin-bottom: .35rem;
    }

    .product-editor .form-text {
        font-size: .8rem;
    }

    /* Keep controls touch-friendly; don't compress Bootstrap's floating labels. */
    .product-editor .form-control,
    .product-editor .form-select,
    .product-editor .input-group-text {
        font-size: 1rem;
    }

    .product-editor .form-floating > .form-control,
    .product-editor .form-floating > .form-select {
        height: 3.5rem;
        min-height: 3.5rem;
    }

    .product-editor .form-floating > label {
        padding: 1rem .75rem;
    }

    .product-editor .input-group > .form-floating {
        flex: 1 1 auto;
        min-width: 0;
    }

    .product-editor .input-group > .input-group-text {
        min-height: 3.5rem;
    }

    .product-editor .pricing-option .card-body {
        padding: .85rem;
    }

    .product-editor .pricing-option p {
        line-height: 1.4;
    }

    /* Quill editor sizing scoped to this page only. */
    .product-editor .ql-toolbar.ql-snow {
        padding: 6px 8px;
    }

    .product-editor .ql-editor {
        min-height: 135px;
        max-height: 300px;
        overflow-y: auto;
        padding: 12px;
    }

@media (max-width: 767.98px) {
    .product-editor .card-body {
        padding: 1rem;
    }

    .product-editor .page-actions,
    .product-editor .save-actions {
        width: 100%;
    }

        .product-editor .save-actions > * {
            flex: 1 1 0;
        }

    .product-editor .ql-editor {
        min-height: 160px;
        max-height: none;
    }
}
