.home-hero {
    background: linear-gradient(120deg, #f8fbff 0%, #edf4ff 50%, #fdf6ec 100%);
    border-bottom: 1px solid #e5e7eb;
}

.home-hero-eyebrow {
    color: #1f2937;
}

.home-hero-title {
    color: #111827;
}

.home-hero-subtitle {
    color: #374151;
    max-width: 760px;
}

.mud-theme-dark .home-hero {
    background: linear-gradient(120deg, #1f2937 0%, #111827 50%, #0f172a 100%);
    border-bottom-color: rgba(255, 255, 255, .08);
}

.mud-theme-dark .home-hero-eyebrow {
    color: #cbd5e1;
}

.mud-theme-dark .home-hero-title {
    color: #f8fafc;
}

.mud-theme-dark .home-hero-subtitle {
    color: #cbd5e1;
}

.category-tile {
    border: 1px solid rgba(0, 0, 0, .08);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: pointer;
    background: var(--mud-palette-surface);
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.category-tile-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #f3f4f6;
}

.category-tile-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform .3s ease;
}

.category-tile:hover .category-tile-image img {
    transform: scale(1.06);
}

.category-tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .12) 100%);
    pointer-events: none;
}

.category-tile-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #9ca3af;
}

.category-tile-label {
    padding: 10px 12px;
    text-align: center;
}

.mud-theme-dark .category-tile {
    border-color: rgba(255, 255, 255, .08);
}

.mud-theme-dark .category-tile-image {
    background: #1e293b;
}

.mud-theme-dark .category-tile-overlay {
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .25) 100%);
}

.mud-theme-dark .category-tile-placeholder {
    color: #64748b;
}

.product-card-image-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.product-card-image-frame img {
    width: 100%;
    aspect-ratio: 4 / 5;
    display: block;
}

.category-product-image-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.category-product-image-frame img {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    display: block;
}

.product-primary-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.product-primary-frame img,
.product-gallery-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    display: block;
}

.product-gallery-thumb {
    width: 80px;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.product-gallery-thumb.selected {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 1px var(--mud-palette-primary) inset;
}

.quick-view-main-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
}

.quick-view-thumb {
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    cursor: pointer;
}

.quick-view-thumb.selected {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 1px var(--mud-palette-primary) inset;
}

.manage-gallery-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.manage-gallery-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255, 255, 255, .85);
}

.dialog-category-image {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
}

.image-frame {
    width: 200px;
    height: 200px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
}

.image-tile-item {
    width: 220px;
}

.image-tile {
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.image-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

.library-search {
    min-width: 260px;
}

.library-upload-alt {
    min-width: 220px;
}

.dialog-image-frame {
    width: 100%;
    max-height: 420px;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
}

.picker-search {
    min-width: 250px;
}

.picker-item {
    width: 200px;
}

.picker-tile {
    border: 1px solid #e5e7eb;
    padding: 8px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.picker-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.picker-tile.selected {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 1px var(--mud-palette-primary) inset;
}

.picker-frame {
    width: 100%;
    height: 200px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
}

.appbar-professional {
    padding-inline: 1rem;
    min-height: 84px;
    padding-block: 0.35rem;
}

.appbar-brand {
    line-height: 1;
    white-space: nowrap;
}

.appbar-search {
    width: min(620px, 48vw);
    margin-inline: 0.75rem;
}

.appbar-actions-desktop .mud-button-root {
    min-width: auto;
    text-transform: none;
}

.appbar-currency-select {
    min-width: 78px;
}

/* ── Subcategory section on category page ── */

.subcategory-section {
    border: 1px solid rgba(0, 0, 0, .06);
    background: var(--mud-palette-surface);
}

.subcategory-heading {
    color: var(--mud-palette-text-secondary);
    letter-spacing: .02em;
}

.subcategory-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.subcategory-scroll::-webkit-scrollbar {
    height: 4px;
}

.subcategory-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .15);
    border-radius: 4px;
}

.subcategory-chip-link {
    flex-shrink: 0;
}

.subcategory-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 100px;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    cursor: pointer;
    background: var(--mud-palette-background);
}

.subcategory-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
    border-color: var(--mud-palette-primary);
}

.subcategory-chip-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f4f6;
}

.subcategory-chip-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.subcategory-chip-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f3f4f6;
    color: #9ca3af;
}

/* dark mode overrides */
.mud-theme-dark .subcategory-section {
    border-color: rgba(255, 255, 255, .06);
}

.mud-theme-dark .subcategory-chip {
    border-color: rgba(255, 255, 255, .10);
}

.mud-theme-dark .subcategory-chip-img,
.mud-theme-dark .subcategory-chip-icon {
    background: #1e293b;
}

.mud-theme-dark .subcategory-chip-icon {
    color: #64748b;
}

.mud-theme-dark .subcategory-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .15);
}

/* HTML Editor */
.html-editor-content {
    font-size: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.html-editor-content h1,
.html-editor-content h2,
.html-editor-content h3,
.html-editor-content h4,
.html-editor-content h5,
.html-editor-content h6 {
    margin-top: .8em;
    margin-bottom: .4em;
}

.html-editor-content blockquote {
    border-left: 4px solid var(--mud-palette-primary);
    margin: .8em 0;
    padding: .4em 1em;
    background: rgba(0, 0, 0, .03);
}

.mud-theme-dark .html-editor-content blockquote {
    background: rgba(255, 255, 255, .04);
}

.html-editor-content hr {
    border: none;
    border-top: 1px solid var(--mud-palette-lines-default);
    margin: 1em 0;
}

.html-editor-content table {
    border-collapse: collapse;
    width: 100%;
    margin: .8em 0;
}

.html-editor-content th,
.html-editor-content td {
    border: 1px solid #ccc;
    padding: 6px 10px;
}

.html-editor-content img {
    max-width: 100%;
    height: auto;
}

/* Product description (public page) */
.product-description {
    font-size: 1rem;
    line-height: 1.7;
    word-wrap: break-word;
}

.product-description h1,
.product-description h2,
.product-description h3,
.product-description h4,
.product-description h5,
.product-description h6 {
    margin-top: .8em;
    margin-bottom: .4em;
}

.product-description blockquote {
    border-left: 4px solid var(--mud-palette-primary);
    margin: .8em 0;
    padding: .4em 1em;
    background: rgba(0, 0, 0, .03);
}

.mud-theme-dark .product-description blockquote {
    background: rgba(255, 255, 255, .04);
}

.product-description hr {
    border: none;
    border-top: 1px solid var(--mud-palette-lines-default);
    margin: 1em 0;
}

.product-description table {
    border-collapse: collapse;
    width: 100%;
    margin: .8em 0;
}

.product-description th,
.product-description td {
    border: 1px solid #ccc;
    padding: 6px 10px;
}

.product-description img {
    max-width: 100%;
    height: auto;
}
