:root {
    --clr-dark: #301e10;
    --clr-accent: #ad7a55;
    --clr-light: #ffffff;
    --clr-soft: #f6f1eb;
    --clr-border: #e5d8cc;
    --clr-muted: #6f6053;
    --clr-danger: #a02f2f;
    --clr-success: #23603a;

    --font-title: 'Cardo', serif;
    --font-body: 'Montserrat', sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-soft: 0 12px 30px rgba(48, 30, 16, 0.08);
    --container: 1320px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--clr-dark);
    background: var(--clr-light);
    line-height: 1.5;
}

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

img {
    max-width: 100%;
    display: block;
}

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

.main-container,
.product-page-container {
    width: min(var(--container), calc(100% - 5rem));
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .main-container,
    .product-page-container {
        width: min(var(--container), calc(100% - 2rem));
    }

    .navbar,
    .footer {
        width: calc(100% - 2rem);
    }
}

.navbar {
    position: sticky;
    top: 0.5rem;
    z-index: 1000;
    width: min(var(--container), calc(100% - 5rem));
    margin: 0.75rem auto 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.38));
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    box-shadow:
        0 12px 28px rgba(48, 30, 16, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
    width: 100%;
    padding: 0.7rem 1.3rem;
}

.navbar-brand-only {
    gap: 1rem;
}

.logo img {
    width: 145px;
    height: auto;
}

.mobile-menu-btn {
    border: 1px solid var(--clr-border);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--clr-light);
}

.nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 76px;
    background: var(--clr-light);
    border-bottom: 1px solid var(--clr-border);
    display: none;
    flex-direction: column;
    padding: 1rem;
    gap: 0.75rem;
}

.nav-links a {
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid var(--clr-soft);
    font-weight: 500;
}

.nav-links a.active {
    color: var(--clr-accent);
}

.nav-links.open {
    display: flex;
}

.btn-contacto,
.btn-header-contact,
.btn-primary,
.btn-filter,
.btn-small {
    border: 0;
    background: var(--clr-dark);
    color: var(--clr-light);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-contacto,
.btn-header-contact,
.btn-filter {
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-primary {
    font-weight: 600;
}

.btn-small {
    font-size: 0.82rem;
    padding: 0.45rem 0.75rem;
}

.btn-danger {
    background: var(--clr-danger);
}

.btn-clear {
    background: transparent;
    color: var(--clr-muted);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    text-align: center;
}

.btn-contacto:hover,
.btn-header-contact:hover,
.btn-primary:hover,
.btn-filter:hover,
.btn-small:hover {
    transform: translateY(-1px);
    opacity: 0.94;
}

.btn-header-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(48, 30, 16, 0.92);
    border: 1px solid rgba(48, 30, 16, 0.35);
    margin-left: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.modal-open {
    overflow: hidden;
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.contact-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.contact-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 16, 9, 0.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.contact-modal-card {
    position: relative;
    width: min(560px, 100%);
    border-radius: 24px;
    padding: 1.4rem 1.2rem 1.2rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(165%);
    -webkit-backdrop-filter: blur(20px) saturate(165%);
    box-shadow:
        0 22px 44px rgba(28, 17, 8, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.contact-modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: rgba(48, 30, 16, 0.78);
    background: rgba(255, 255, 255, 0.56);
    cursor: pointer;
}

.contact-modal-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 1.1rem;
}

.contact-modal-brand img {
    width: min(270px, 88%);
    height: auto;
}

.contact-modal-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.contact-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 0.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.34);
    color: var(--clr-dark);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.contact-action:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.48);
}

.contact-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(48, 30, 16, 0.88);
    font-size: 2rem;
    line-height: 1;
}

.contact-action:nth-child(1) .contact-action-icon {
    color: #1e90eb;
}

.contact-action:nth-child(2) .contact-action-icon {
    color: #1dbb68;
}

.contact-action:nth-child(3) .contact-action-icon {
    color: #f54442;
}

.contact-action-label {
    font-size: 0.87rem;
    font-weight: 700;
}

@media (max-width: 640px) {
    .contact-modal-card {
        border-radius: 18px;
        padding: 1rem 0.9rem 0.9rem;
    }

    .contact-modal-actions {
        gap: 0.55rem;
    }

    .contact-action {
        padding: 0.7rem 0.45rem;
    }

    .contact-action-icon {
        font-size: 1.7rem;
    }

    .contact-action-label {
        font-size: 0.8rem;
    }

    .footer-bottom {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .social-links-row {
        gap: 0.85rem;
    }

    .footer-signature {
        justify-content: center;
    }
}

.hero-catalog {
    position: relative;
    width: min(var(--container), calc(100% - 5rem));
    margin: 1rem auto 0;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 18px 42px rgba(48, 30, 16, 0.16);
    padding: 0;
    background: #111;
}

@media (max-width: 1024px) {
    .hero-catalog {
        width: min(var(--container), calc(100% - 2rem));
    }
}

.hero-image {
    position: relative;
    width: 100%;
    height: auto;
    display: block;
    z-index: 0;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(100deg, rgba(20, 12, 7, 0.62), rgba(20, 12, 7, 0.28) 50%, rgba(173, 122, 85, 0.20) 100%),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.09) 0, transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0, transparent 32%);
    z-index: 1;
}

.hero-content {
    position: absolute;
    inset: 0;
    color: var(--clr-light);
    width: 100%;
    max-width: 1140px;
    padding: clamp(1.25rem, 3.2vw, 2.8rem);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    margin-bottom: 0.75rem;
}

.hero-content h1 {
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 5.5vw, 3.05rem);
    line-height: 1.1;
    max-width: 760px;
}

.hero-content p {
    margin-top: 1rem;
    max-width: 620px;
    color: rgba(255, 255, 255, 0.88);
}

@media (max-width: 767px) {
    .main-container,
    .product-page-container {
        width: min(var(--container), calc(100% - 1rem));
    }

    .navbar {
        width: calc(100% - 1rem);
        margin-top: 0.4rem;
        border-radius: 14px;
    }

    .navbar-container {
        min-height: 64px;
        padding: 0.55rem 0.85rem;
    }

    .hero-catalog {
        width: calc(100% - 1rem);
        margin-top: 0.6rem;
        border-radius: 16px;
    }

    .hero-pattern {
        background-image: linear-gradient(180deg, rgba(20, 12, 7, 0.24), rgba(20, 12, 7, 0.68));
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 1.5rem;
    }
}

.catalog-toolbar {
    padding: 1.4rem 0 1rem;
}

.input-search,
.input-select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.login-form input {
    border: 1px solid var(--clr-border);
    background: var(--clr-light);
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.85rem;
    width: 100%;
}

.filters-shell {
    background: #fff;
    border: 1px solid #efe7de;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(48, 30, 16, 0.08);
    padding: 1rem;
}

.filters-form {
    display: grid;
    gap: 0.95rem;
}

.filters-top {
    display: grid;
    gap: 0.7rem;
}

.search-wrap {
    position: relative;
}

.search-wrap i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.92rem;
    color: #9a8d80;
}

.filters-top .input-search {
    padding-left: 2.35rem;
    border-radius: 10px;
    background: #f8f6f3;
    border-color: #e7ddd1;
}

.filters-top .input-search:focus,
.filters-grid .input-select:focus {
    outline: none;
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 1px var(--clr-accent);
    background: #fff;
}

.filters-actions {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: 1fr 1fr;
}

.filters-actions .btn-filter,
.filters-actions .btn-clear {
    padding: 0.72rem 0.9rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
}

.filters-actions .btn-clear {
    order: 1;
}

.filters-actions .btn-filter {
    order: 2;
}

.filters-divider {
    border: 0;
    border-top: 1px solid #eee5db;
}

.filters-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-field {
    display: grid;
    gap: 0.35rem;
}

.filter-field span {
    color: #887969;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-left: 0.1rem;
}

.filters-grid .input-select {
    border-radius: 10px;
    border-color: #e7ddd1;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23301E10' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 0.95em;
    background-position: right 0.8rem center;
    padding-right: 2rem;
}

.catalog-count {
    margin-top: 0.75rem;
    color: var(--clr-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.product-grid {
    display: grid;
    gap: 1.1rem;
    padding-bottom: 2.2rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-card {
    border: 1px solid var(--clr-border);
    background: var(--clr-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.product-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-image {
    position: relative;
    background: var(--clr-soft);
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

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

.image-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    color: var(--clr-muted);
    font-size: 0.92rem;
    background: linear-gradient(135deg, #f3ebe2, #fbf7f2);
}

.product-info {
    padding: 0.85rem;
    display: grid;
    gap: 0.35rem;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.product-price {
    font-weight: 700;
}

.product-price-block {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.product-price-old {
    color: #7f7870;
    text-decoration: line-through;
    text-decoration-color: #c1272d;
    text-decoration-thickness: 2px;
    font-weight: 600;
}

.product-price-promo {
    color: #157347;
    font-weight: 800;
}

.promo-badge {
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    z-index: 3;
    background: #1f8f5a;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.product-meta-small {
    color: var(--clr-muted);
    font-size: 0.82rem;
}

.product-colors {
    display: flex;
    gap: 0.38rem;
    margin-top: 0.2rem;
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.empty-state,
.not-found {
    text-align: center;
    padding: 3.2rem 0;
}

.empty-state h2,
.not-found h1,
.product-title-large,
.related-products h2,
.admin-heading h1,
.login-card h1 {
    font-family: var(--font-title);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    padding-bottom: 3rem;
}

.page-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-content: center;
    border: 1px solid var(--clr-border);
}

.page-number.active {
    background: var(--clr-dark);
    color: var(--clr-light);
    border-color: var(--clr-dark);
}

.product-page-container {
    padding: 1.3rem 0 3rem;
}

.breadcrumbs-product {
    color: var(--clr-muted);
    font-size: 0.86rem;
    margin-bottom: 1rem;
}

.breadcrumbs-product .separator {
    margin: 0 0.25rem;
}

.product-details-section {
    display: grid;
    gap: 1.5rem;
}

.product-gallery {
    display: grid;
    gap: 0.7rem;
}

.thumbnails {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
}

.thumb {
    width: 72px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
}

.thumb.active {
    border-color: var(--clr-accent);
}

.main-image {
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--clr-soft);
}

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

.product-info-column {
    display: grid;
    gap: 0.95rem;
}

.product-title-large {
    line-height: 1.1;
    font-size: clamp(1.8rem, 6vw, 2.4rem);
}

.product-price-large {
    font-size: 1.55rem;
    font-weight: 700;
}

.promo-price-large {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    flex-wrap: wrap;
}

.product-description {
    color: var(--clr-muted);
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
    padding: 1rem 0;
}

.option-group h3 {
    margin-bottom: 0.5rem;
}

.size-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.size-chip {
    border: 1px solid var(--clr-border);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.color-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.color-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--clr-border);
    border-radius: 999px;
    padding: 0.34rem 0.6rem;
    width: fit-content;
    white-space: nowrap;
}

.color-label {
    font-size: 0.84rem;
    line-height: 1;
}

.label-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.product-meta {
    display: grid;
    gap: 0.25rem;
    color: var(--clr-muted);
    font-size: 0.9rem;
}

.product-meta strong {
    color: var(--clr-dark);
}

.related-products {
    margin-top: 2.5rem;
}

.related-products h2 {
    margin-bottom: 1rem;
    font-size: 1.7rem;
}

.related-empty {
    color: var(--clr-muted);
}

.footer {
    width: min(var(--container), calc(100% - 5rem));
    margin: 1rem auto 1.1rem;
    background: var(--clr-dark);
    color: var(--clr-light);
    padding: 2.2rem 0 1.2rem;
    border-radius: 22px;
    overflow: hidden;
}

.footer-container {
    width: 100%;
    margin: 0;
    padding: 0 2rem;
}

.footer-top {
    display: grid;
    gap: 1.4rem;
}

.footer h3 {
    color: var(--clr-accent);
    font-family: var(--font-title);
    margin-bottom: 0.55rem;
}

.footer-branch {
    display: grid;
    align-content: start;
    gap: 0.35rem;
}

.contact-details p {
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.86);
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.contact-details i {
    width: 16px;
    color: var(--clr-accent);
    margin-top: 0.18rem;
    flex: 0 0 16px;
}

.contact-details span,
.contact-details a {
    line-height: 1.45;
}

.contact-details a {
    color: rgba(255, 255, 255, 0.92);
}

.contact-details a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.social-links-row {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.social-btn {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.15rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    margin-top: 1.2rem;
    padding-top: 1rem;
    display: grid;
    align-items: center;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
}

.footer-signature {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.footer-isotype {
    width: 34px;
    height: auto;
    opacity: 0.92;
    filter: brightness(0) invert(1);
}

.footer-copy {
    text-align: center;
}

.copy-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.84rem;
}

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #f9f2ea, #fff);
    display: grid;
    place-content: center;
    padding: 1rem;
}

.login-wrap {
    width: min(430px, 100%);
}

.login-card {
    background: var(--clr-light);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: var(--shadow-soft);
}

.login-logo {
    width: 92px;
    margin: 0 auto 0.9rem;
}

.login-card h1 {
    text-align: center;
    font-size: 2rem;
}

.login-card p {
    text-align: center;
    color: var(--clr-muted);
    margin-bottom: 1rem;
}

.login-form {
    display: grid;
    gap: 0.7rem;
}

.login-form label,
.admin-form label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.93rem;
}

.back-link {
    margin-top: 1rem;
    display: inline-block;
    color: var(--clr-muted);
}

.flash {
    margin-bottom: 0.9rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.flash-error {
    background: #fdecea;
    color: #902d23;
    border: 1px solid #f4c8c3;
}

.flash-success {
    background: #e7f6eb;
    color: #1f5d37;
    border: 1px solid #c7e8d1;
}

.admin-body {
    background: #f3f0eb;
}

.admin-topbar {
    width: min(1200px, calc(100% - 2rem));
    margin: 0.7rem auto 0;
    background: #fff;
    border: 1px solid #e8ddd2;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(48, 30, 16, 0.06);
    padding: 0.7rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0.5rem;
    z-index: 1000;
}

.admin-brand img {
    width: 140px;
}

.admin-nav {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.admin-nav a {
    color: #5f5f5f;
    border-radius: 10px;
    padding: 0.52rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.admin-nav a:hover {
    background: #f5f5f5;
}

.admin-nav a.active {
    background: #fdf8f5;
    color: var(--clr-dark);
    border-color: rgba(173, 122, 85, 0.38);
}

.admin-nav .logout-link {
    color: #b32424;
}

.admin-nav .logout-link:hover {
    background: #fff0f0;
}

.admin-container {
    width: min(1200px, calc(100% - 2rem));
    margin: 0.95rem auto 2rem;
    display: grid;
    gap: 1rem;
}

.admin-heading p {
    color: var(--clr-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.stat-card,
.admin-panel {
    background: #fff;
    border: 1px solid #e8ddd2;
    border-radius: 14px;
    padding: 1.05rem;
    box-shadow: 0 8px 20px rgba(48, 30, 16, 0.05);
}

.stat-card h2 {
    font-size: 1.75rem;
    font-family: var(--font-title);
}

.stat-card p {
    color: var(--clr-muted);
}

.admin-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--clr-border);
    padding: 0.62rem 0.52rem;
    vertical-align: top;
    text-align: left;
    font-size: 0.9rem;
}

.admin-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--clr-muted);
}

.table-sub {
    font-size: 0.75rem;
    color: var(--clr-muted);
    margin-top: 0.2rem;
}

.actions-cell {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.bulk-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.8rem;
}

.bulk-actions select {
    min-width: 220px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-active {
    background: #e7f6eb;
    color: #226b40;
}

.status-paused {
    background: #fbe9d8;
    color: #91521f;
}

.status-featured {
    background: #fff5d8;
    color: #8a5a06;
}

.featured-toggle-form {
    display: inline-flex;
    align-items: center;
}

.featured-switch {
    position: relative;
    display: inline-flex;
    width: 50px;
    height: 28px;
    cursor: pointer;
}

.featured-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.featured-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d4d4d4;
    transition: background-color 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.featured-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease;
}

.featured-switch input:checked + .featured-slider {
    background: #15c978;
}

.featured-switch input:checked + .featured-slider::before {
    transform: translateX(22px);
}

.table-price-old {
    display: block;
    color: #7f7870;
    font-size: 0.8rem;
    text-decoration: line-through;
    text-decoration-color: #c1272d;
    text-decoration-thickness: 2px;
}

.table-price-promo {
    display: block;
    color: #157347;
    font-weight: 700;
}

.inline-edit-form {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.inline-edit-form input[type='text'] {
    min-width: 180px;
}

.inline-color-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.inline-color-row input[type='text'] {
    min-width: 120px;
}

.admin-form {
    display: grid;
    gap: 1rem;
}

.admin-filters-form {
    gap: 0.85rem;
}

.admin-filters-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.admin-filters-grid label {
    display: grid;
    gap: 0.32rem;
    font-size: 0.84rem;
}

.admin-filters-grid input,
.admin-filters-grid select {
    padding: 0.58rem 0.72rem;
    font-size: 0.87rem;
}

.admin-field-wide {
    grid-column: span 2;
}

.compact-form {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.form-block {
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
}

.checkbox-grid {
    margin-top: 0.55rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
}

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

.admin-form textarea {
    resize: vertical;
    min-height: 120px;
}

.existing-images-grid {
    margin-top: 0.6rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.existing-image-card {
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #faf8f5;
}

.existing-image-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.existing-image-card span {
    display: block;
    padding: 0.5rem;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

@media (max-width: 767px) {
    .footer {
        width: calc(100% - 1rem);
        border-radius: 16px;
        margin-bottom: 0.7rem;
    }

    .footer-container {
        padding: 0 1rem;
    }

    .admin-topbar {
        width: calc(100% - 1rem);
        margin-top: 0.45rem;
        top: 0.35rem;
        border-radius: 12px;
        padding: 0.55rem 0.7rem;
    }

    .admin-filters-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-field-wide {
        grid-column: 1 / -1;
    }
}

@media (min-width: 768px) {
    .navbar-brand-only {
        justify-content: flex-start;
    }

    .mobile-menu-btn {
        display: none;
    }

    .nav-links {
        position: static;
        display: flex;
        flex-direction: row;
        border: 0;
        gap: 1.2rem;
        padding: 0;
        background: transparent;
    }

    .nav-links a {
        border: 0;
        padding: 0;
    }

    .filters-shell {
        padding: 1.2rem 1.3rem;
    }

    .filters-top {
        grid-template-columns: 1.35fr auto;
        align-items: center;
    }

    .filters-actions {
        display: flex;
        grid-template-columns: none;
        gap: 0.65rem;
    }

    .filters-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-details-section {
        grid-template-columns: 1.05fr 1fr;
        align-items: start;
    }

    .product-gallery {
        grid-template-columns: 90px 1fr;
        gap: 1rem;
    }

    .thumbnails {
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        max-height: 580px;
    }

    .thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
    }

    .footer-top {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }

    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .checkbox-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .existing-images-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-filters-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .admin-filters-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}
