body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: #f8fafc;
    color: #1f2933;
}

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

/* ===== Form Error Banner ===== */
.form-error-banner {
    margin: 0 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-error-banner svg {
    flex-shrink: 0;
}

/* ===== Field Error ===== */
.form-field__error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-field__input--error {
    border-color: #fca5a5;
    background: #fef2f2;
}

.form-field__input--error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ===== Dashboard Navbar ===== */
.dash-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    background: #0f172a;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 0.75rem;
    min-height: 56px;
}

.dash-nav__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.dash-nav__logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.dash-nav__title {
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dash-nav__subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Menu Toggle */
.dash-nav__toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.dash-nav__toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Menu Container */
.dash-nav__menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: space-between;
}

/* Navigation Links */
.dash-nav__links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dash-nav__link {
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    transition: all 0.2s;
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-nav__link svg {
    opacity: 0.7;
    flex-shrink: 0;
}

.dash-nav__link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.dash-nav__link:hover svg {
    opacity: 1;
}

/* Action Buttons */
.dash-nav__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-nav__btn {
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dash-nav__btn--primary {
    background: #ff9628;
    color: #fff;
}

.dash-nav__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 150, 40, 0.35);
}

.dash-nav__btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dash-nav__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

.dash-nav__btn--outline {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.dash-nav__btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.dash-nav__btn--danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.dash-nav__btn--danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Nav Link Active State */
.dash-nav__link--active {
    background: rgba(124, 58, 237, 0.25);
    color: #c4b5fd;
}

.dash-nav__link--active:hover {
    background: rgba(124, 58, 237, 0.3);
    color: #c4b5fd;
}

/* Mobile Toggle Hamburger Lines */
.dash-nav__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.dash-nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.dash-nav__toggle.active span:nth-child(2) {
    opacity: 0;
}

.dash-nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .dash-nav {
        flex-wrap: wrap;
        padding: 0.5rem 0.75rem;
    }
    
    .dash-nav__toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        order: 2;
    }
    
    .dash-nav__links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.25rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0.5rem;
        order: 4;
    }
    
    .dash-nav__links.open {
        display: flex;
    }
    
    .dash-nav__link {
        padding: 0.75rem 0.85rem;
        text-align: left;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 0.65rem;
    }
    
    .dash-nav__actions {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        order: 5;
        padding-top: 0.5rem;
    }
    
    .dash-nav__actions.open {
        display: flex;
    }
    
    .dash-nav__btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .dash-nav {
        padding: 0.4rem 0.65rem;
    }
    
    .dash-nav__logo {
        width: 30px;
        height: 30px;
        border-radius: 6px;
    }
    
    .dash-nav__title {
        font-size: 0.85rem;
    }
    
    .dash-nav__subtitle {
        display: none;
    }
}

/* ===== Alert Banner ===== */
.dash-alert {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-bottom: 1px solid #fcd34d;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dash-alert__icon {
    font-size: 1.1rem;
}

.dash-alert__text {
    color: #92400e;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.dash-alert__text strong {
    font-weight: 700;
}

.dash-alert__link {
    color: #b45309;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dash-alert__link:hover {
    color: #92400e;
}

@media (max-width: 600px) {
    .dash-alert {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    
    .dash-alert__text {
        font-size: 0.8rem;
    }
}

/* ===== Main Content ===== */
.dash-main {
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dash-messages {
    margin-bottom: 1rem;
    display: grid;
    gap: 0.5rem;
}

.dash-message {
    background: #eef3ff;
    color: #1a2b6d;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #d5ddff;
}

/* ===== Buttons ===== */
.cart-btn {
    background: #0f172a;
    color: #fff;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s;
    display: inline-block;
}

.cart-btn:hover {
    background: #111827;
    transform: translateY(-1px);
}

/* ===== Section Titles ===== */
.section-title {
    font-size: 1.6rem;
}

.section-subtitle {
    color: #5a6472;
}

/* ===== Container ===== */
.container {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
    border: 1px solid #e3e8ef;
}

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th, td {
    text-align: left;
}

th {
    color: #475467;
    font-weight: 700;
}

/* ===== Form Elements ===== */
input[type="text"],
input[type="number"],
textarea {
    padding: 0.55rem 0.7rem;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
}

label {
    font-weight: 600;
    color: #334155;
}

/* ===== Auth Card ===== */
.auth-card {
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

/* ===== Products Page ===== */
.products-page {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.products-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.products-page__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.products-page__count {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 400;
}

.products-page__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    min-width: 240px;
}

.search-box__icon {
    color: #94a3b8;
    font-size: 1rem;
}

.search-box__input {
    border: none;
    outline: none;
    font-size: 0.9rem;
    width: 100%;
    background: transparent;
}

.search-box__input::placeholder {
    color: #94a3b8;
}

/* ===== Products Table ===== */
.products-table-wrap {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

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

.products-table th {
    background: #f8fafc;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.products-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.products-table tr:last-child td {
    border-bottom: none;
}

.products-table tr:hover {
    background: #fafbfc;
}

/* Product Cell */
.product-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-cell__img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.product-cell__placeholder,
.product-card__placeholder {
    display: grid;
    place-items: center;
    color: #94a3b8;
}

.product-cell__placeholder svg,
.product-card__placeholder svg {
    width: 22px;
    height: 22px;
}

.product-cell__info h4 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.product-cell__sku {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
}

/* Price Cell */
.price-cell {
    font-weight: 700;
    color: #0f172a;
}

.price-cell--offer {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.price-cell__original {
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 400;
}

.price-cell__current {
    color: #059669;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge--active {
    background: #dcfce7;
    color: #166534;
}

.status-badge--inactive {
    background: #f1f5f9;
    color: #64748b;
}

.status-badge__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge--active .status-badge__dot {
    background: #22c55e;
}

.status-badge--inactive .status-badge__dot {
    background: #94a3b8;
}

/* Actions Cell */
.actions-cell {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.action-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.action-btn--primary {
    background: #ff9628;
    color: #fff;
    border-color: #ff9628;
}

.action-btn--primary:hover {
    background: #e8850f;
    border-color: #e8850f;
}

.action-btn--danger {
    color: #dc2626;
}

.action-btn--danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

/* ===== Products Cards (Mobile) ===== */
.products-cards {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.product-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.product-card__header {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.product-card__img {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.product-card__info {
    flex: 1;
}

.product-card__name {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.product-card__sku {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0 0 0.5rem;
}

.product-card__meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.product-card__price {
    font-weight: 700;
    color: #0f172a;
}

.product-card__actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.product-card__actions .action-btn {
    flex: 1;
    justify-content: center;
}

/* Responsive Table/Cards */
@media (max-width: 900px) {
    .products-table-wrap {
        display: none;
    }
    
    .products-cards {
        display: flex;
    }
}

@media (max-width: 600px) {
    .products-page {
        padding: 1rem;
    }
    
    .products-page__header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: unset;
        width: 100%;
    }
    
    .products-page__actions {
        flex-direction: column;
    }
}

/* ===== Variants Page ===== */
.variants-page {
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.variants-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.variants-page__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.variants-page__breadcrumb {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.25rem 0 0;
}

.variants-page__breadcrumb a {
    color: #7c3aed;
    text-decoration: underline;
}

/* Variant Cards Grid */
.variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.variant-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.2s, transform 0.2s;
}

.variant-card:hover {
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.variant-card__header {
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.variant-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.variant-card__sku {
    font-size: 0.8rem;
    color: #94a3b8;
    background: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.variant-card__body {
    padding: 1.25rem;
}

.variant-card__image-wrap {
    margin-bottom: 1rem;
    text-align: center;
}

.variant-card__image {
    max-width: 100%;
    max-height: 160px;
    border-radius: 10px;
    object-fit: contain;
    background: #f8fafc;
}

.variant-card__options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #f1f5f9;
}

.option-row:last-child {
    border-bottom: none;
}

.option-row__label {
    font-size: 0.85rem;
    color: #64748b;
}

.option-row__value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.variant-card__footer {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.variant-card__footer .action-btn {
    flex: 1;
    justify-content: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.empty-state__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state__icon svg {
    width: 48px;
    height: 48px;
    color: #cbd5e1;
}

.empty-state__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.empty-state__text {
    color: #64748b;
    margin: 0 0 1.5rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.2s;
    border: 1px solid #e2e8f0;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

.modal__header {
    padding: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.modal__close:hover {
    color: #64748b;
}

.modal__body {
    padding: 1.25rem;
}

.modal__footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Form Grid */
.form-grid {
    display: grid;
    gap: 1rem;
}

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

@media (max-width: 500px) {
    .form-grid--2 {
        grid-template-columns: 1fr;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-field__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.form-field__input {
    padding: 0.65rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field__input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* ===== Category Multi Select ===== */
.category-multi-select {
    position: relative;
}

.category-multi-select__trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 0.9rem;
    color: #334155;
    justify-content: space-between;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.category-multi-select__trigger:hover {
    border-color: #cbd5e1;
}

.category-multi-select__trigger:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

.category-multi-select__text {
    font-weight: 600;
}

.category-multi-select__count {
    margin-left: auto;
    font-size: 0.8rem;
    color: #64748b;
}

.category-multi-select__chevron {
    font-size: 0.8rem;
    color: #64748b;
}

.category-multi-select__menu {
    position: absolute;
    z-index: 20;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    padding: 0.5rem;
    margin-top: 0.4rem;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

.category-multi-select__menu.is-open {
    display: block;
}

.category-multi-select__option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
}

.category-multi-select__option:hover {
    background: #f8fafc;
}

.category-multi-select__option input {
    margin: 0;
}

.category-multi-select__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.category-multi-select__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-multi-select__placeholder {
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    display: block;
}

.category-multi-select__name {
    font-size: 0.9rem;
    color: #1f2937;
}

.category-multi-select__empty {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: center;
}

.category-selected {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-selected__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
    color: #334155;
}

.category-selected__icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #334155;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    overflow: hidden;
    flex-shrink: 0;
}

.category-selected__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-selected__name {
    font-weight: 600;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-selected__empty {
    color: #94a3b8;
    font-size: 0.8rem;
}

/* Enhanced Image Upload Grid */
.image-upload-panel {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.9rem;
    background: #f8fafc;
}

.image-upload-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    gap: 0.5rem;
}

.image-upload-meta {
    font-size: 0.78rem;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.image-upload-drop {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 2px dashed #d8dee9;
    border-radius: 12px;
    padding: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.image-upload-drop:hover {
    border-color: #ff9628;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.image-upload-drop__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff3e6;
    color: #c2410c;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
}

.image-upload-drop__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: #334155;
    font-size: 0.9rem;
}

.image-upload-drop__text strong {
    font-size: 0.95rem;
    color: #0f172a;
}

.image-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.image-upload-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.65rem;
    flex-wrap: wrap;
}

.image-upload-help {
    font-size: 0.8rem;
    color: #94a3b8;
}

.image-upload-clear {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.image-upload-clear:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.image-upload-error {
    margin-top: 0.5rem;
    min-height: 1rem;
    font-size: 0.8rem;
    color: #dc2626;
}

.image-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.image-upload-tile {
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.image-upload-tile--preview {
    border: 1px solid #e2e8f0;
    background: #fff;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0.65rem;
    min-height: 170px;
    position: relative;
}

.image-upload-tile--existing {
    border-color: #cbd5f5;
    background: #f8faff;
}

.image-upload-tile__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ffedd5;
    color: #9a3412;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #fed7aa;
}

.image-upload-tile:hover {
    border-color: #7c3aed;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

.image-upload-tile input[type="file"] {
    font-size: 0.8rem;
    width: 100%;
    cursor: pointer;
}

.image-upload-tile input[type="file"]::file-selector-button {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-bottom: 0.25rem;
    transition: background 0.2s;
}

.image-upload-tile input[type="file"]::file-selector-button:hover {
    background: #6d28d9;
}

.image-upload-tile__preview {
    margin-top: 0.75rem;
    width: 100%;
}

.image-upload-tile__preview img {
    width: 100%;
    max-height: 80px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-upload-tile--preview .image-upload-tile__preview {
    margin-top: 0;
    height: 110px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
}

.image-upload-tile--preview .image-upload-tile__preview img {
    max-height: 110px;
}

.image-upload-tile__meta {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.image-upload-tile__name {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-upload-tile__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #dc2626;
    cursor: pointer;
}

.image-upload-tile__remove:hover {
    color: #b91c1c;
}

.image-upload-tile--preview .image-upload-tile__remove {
    position: absolute;
    top: 6px;
    right: 6px;
    margin-top: 0;
    background: #fff;
    border: 1px solid #fee2e2;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.7rem;
    color: #dc2626;
}

.image-upload-tile--preview .image-upload-tile__remove:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.image-upload-empty {
    border: 1px dashed #e2e8f0;
    background: #fff;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 0.85rem;
    border-radius: 10px;
    text-align: center;
    grid-column: 1 / -1;
}

.image-upload-tile__error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

/* Modal Responsive Enhancements */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        min-height: 50vh;
        border-radius: 20px 20px 0 0;
        display: flex;
        flex-direction: column;
    }
    
    .modal__header {
        padding: 1rem 1.25rem;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        border-radius: 20px 20px 0 0;
        border-bottom: 1px solid #e2e8f0;
        flex-shrink: 0;
    }
    
    .modal__header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #d1d5db;
        border-radius: 2px;
    }
    
    .modal__title {
        font-size: 1.1rem;
        margin-top: 0.5rem;
    }
    
    .modal__body {
        padding: 1rem 1.25rem;
        overflow-y: auto;
        flex: 1;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal__footer {
        padding: 1rem 1.25rem;
        position: sticky;
        bottom: 0;
        background: white;
        flex-direction: column-reverse;
        gap: 0.5rem;
        border-top: 1px solid #e2e8f0;
        flex-shrink: 0;
    }
    
    .modal__footer .action-btn {
        width: 100%;
        justify-content: center;
        padding: 0.9rem;
        font-size: 0.95rem;
    }
    
    .form-grid--2 {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .form-field__label {
        font-size: 0.85rem;
    }
    
    .form-field__input {
        padding: 0.85rem;
        font-size: 16px; /* Prevent iOS zoom */
        border-radius: 10px;
    }
    
    textarea.form-field__input {
        min-height: 100px;
    }
    
    .image-upload-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .image-upload-tile {
        padding: 0.6rem;
        min-height: 90px;
        border-radius: 10px;
    }
    
    .image-upload-tile input[type="file"] {
        font-size: 0.75rem;
    }
    
    .image-upload-tile input[type="file"]::file-selector-button {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .image-upload-tile__preview {
        width: 50px;
        height: 50px;
    }

    .image-upload-tile--preview .image-upload-tile__preview {
        width: 100%;
        height: 100px;
    }

    .image-upload-drop {
        padding: 0.7rem;
    }

    .image-upload-drop__icon {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .image-upload-tile--preview {
        min-height: 150px;
    }
}

@media (max-width: 400px) {
    .modal {
        max-height: 100vh;
        min-height: 60vh;
        border-radius: 0;
    }
    
    .modal__header {
        border-radius: 0;
    }
    
    .modal__header::before {
        display: none;
    }
    
    .image-upload-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .image-upload-tile {
        padding: 0.5rem;
        min-height: 80px;
    }
}

/* Responsive Variants */
@media (max-width: 600px) {
    .variants-page {
        padding: 1rem;
    }
    
    .variants-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Categories Page ===== */
.category-page {
    display: grid;
    gap: 1.5rem;
}
