/* Atlas Rabbit: portada de categorías inspirada en el diseño de referencia.
   Totalmente aislada: las tarjetas clásicas conservan su estilo original. */
#storeCategoriesGrid .rabbit-category-cutout,
#storeCategoriesGrid .rabbit-category-glow,
#storeCategoriesGrid .rabbit-category-shadow,
#storeCategoriesGrid .rabbit-category-corners,
#storeCategoriesGrid .rabbit-category-code { display: none; }

#storeCategoriesSection.rabbit-categories {
    --rabbit-ink: #121212;
    color: var(--rabbit-ink);
    background: #fff;
    padding: 25px 0 35px;
}
#storeCategoriesSection.rabbit-categories > .container:first-child { max-width: 1200px; }
#storeCategoriesSection.rabbit-categories #storeCategoriesTitle {
    display: block;
    margin: 0 0 5px !important;
    padding: 0 !important;
    border: 0;
    color: #171717;
    font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    letter-spacing: .16em;
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 12px;
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    width: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: auto;
    padding: 4px 2px 3px;
    border: 0;
    background: transparent;
    color: var(--rabbit-ink);
    cursor: pointer;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card:focus-visible {
    outline: 2px solid #111;
    outline-offset: 3px;
    border-radius: 8px;
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 1;
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .rabbit-category-glow,
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .rabbit-category-shadow,
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .rabbit-category-corners {
    display: block;
    position: absolute;
    pointer-events: none;
    z-index: 0;
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .rabbit-category-glow {
    left: 4%; top: 5%; width: 92%; aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #cdcdcdba 34%, #aaaaaa48 55%, transparent 72%);
    transform: scale(.55);
    opacity: 0;
    transition: opacity .35s, transform .45s cubic-bezier(.2,.9,.3,1.2);
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .rabbit-category-shadow {
    left: 28%; top: 83%; width: 44%; height: 7%;
    border-radius: 50%;
    background: radial-gradient(ellipse, #0003, transparent 72%);
    animation: rabbitCategoryShadow 3.4s ease-in-out infinite;
    animation-delay: var(--rabbit-delay, 0s);
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .rabbit-category-corners {
    inset: 4px 2px auto;
    aspect-ratio: 1;
    z-index: 3;
    opacity: 0;
    background:
        linear-gradient(#161616,#161616) left top / 10px 1px no-repeat,
        linear-gradient(#161616,#161616) left top / 1px 10px no-repeat,
        linear-gradient(#161616,#161616) right top / 10px 1px no-repeat,
        linear-gradient(#161616,#161616) right top / 1px 10px no-repeat,
        linear-gradient(#161616,#161616) left bottom / 10px 1px no-repeat,
        linear-gradient(#161616,#161616) left bottom / 1px 10px no-repeat,
        linear-gradient(#161616,#161616) right bottom / 10px 1px no-repeat,
        linear-gradient(#161616,#161616) right bottom / 1px 10px no-repeat;
    transition: opacity .3s;
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card img {
    position: absolute;
    inset: 13% 11% auto;
    width: 78%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
    opacity: 1;
    mix-blend-mode: normal;
    filter: drop-shadow(0 6px 6px #0003);
    transform: none;
    border-radius: 0;
    z-index: 2;
    animation: rabbitCategoryFloat 3.4s ease-in-out infinite;
    animation-delay: var(--rabbit-delay, 0s);
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .rabbit-has-cutout img.rabbit-category-main-image { display: none; }
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card img.rabbit-category-cutout { display: block; }
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card[aria-pressed="true"] .rabbit-category-glow { opacity: 1; transform: scale(1); }
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card[aria-pressed="true"] .rabbit-category-corners { opacity: 1; }
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card[aria-pressed="true"] img { scale: 1.08; }
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .rabbit-category-code {
    position: relative;
    display: block;
    margin-top: 2px;
    color: #8c8c8c;
    font: 400 9px/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card > span {
    position: relative;
    z-index: 3;
    display: block;
    margin: 2px 0 0;
    padding: 0;
    max-width: 100%;
    color: #888;
    background: none;
    font: 700 13px/1.15 Impact, 'Arial Narrow', sans-serif;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: center;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    transition: color .25s;
}
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card > span i { display: none; }
#storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card[aria-pressed="true"] > span { color: #111; }
#storeCategoriesSection.rabbit-categories.category-names-hidden #storeCategoriesGrid .category-card { align-items: center; padding: 4px 2px 3px; }
#storeCategoriesSection.rabbit-categories.category-names-hidden #storeCategoriesGrid .category-card > span,
#storeCategoriesSection.rabbit-categories.category-names-hidden #storeCategoriesGrid .rabbit-category-code { display: none; }

/* Franja interactiva de productos de la categoría seleccionada. */
#storeCategoriesSection .rabbit-category-products[hidden] { display: none !important; }
#storeCategoriesSection .rabbit-category-products { display: none; }
#storeCategoriesSection.rabbit-categories .rabbit-category-products {
    display: block;
    position: relative;
    max-width: 1200px;
    margin: 18px auto 0;
    padding: 0 16px;
}
#storeCategoriesSection.rabbit-categories .rabbit-category-products-track {
    display: flex;
    gap: 10px;
    min-height: 125px;
    padding: 10px 2px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
#storeCategoriesSection.rabbit-categories .rabbit-category-products-track::-webkit-scrollbar { display: none; }
#storeCategoriesSection.rabbit-categories .rabbit-category-product {
    position: relative;
    display: block;
    flex: 0 0 calc((100% - 20px)/2.3);
    width: 180px;
    max-width: 230px;
    aspect-ratio: 9 / 14;
    padding: 0;
    border: 0;
    border-radius: 15px;
    background: #e9e9e6;
    color: #fff;
    overflow: hidden;
    scroll-snap-align: start;
    cursor: pointer;
    box-shadow: 0 6px 16px -8px #0006;
    animation: rabbitCategoryEnter .4s both;
    animation-delay: calc(var(--rabbit-product-index, 0) * 35ms);
}
#storeCategoriesSection.rabbit-categories .rabbit-category-product:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
#storeCategoriesSection.rabbit-categories .rabbit-category-product::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 65%, #0009); pointer-events: none; }
#storeCategoriesSection.rabbit-categories .rabbit-category-product img { width: 100%; height: 100%; object-fit: cover; display: block; }
#storeCategoriesSection.rabbit-categories .rabbit-category-product > span { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 10px; color: white; font: 700 13px/1.2 Impact, 'Arial Narrow', sans-serif; letter-spacing: .05em; text-transform: uppercase; text-align: left; text-shadow: 0 1px 8px #0006; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#storeCategoriesSection.rabbit-categories .rabbit-category-product-more { display: flex; align-items: center; justify-content: center; background: #111; color: white; font: 700 22px/1.1 Impact, 'Arial Narrow', sans-serif; text-transform: uppercase; text-align: center; padding: 12px; }
#storeCategoriesSection.rabbit-categories .rabbit-category-product-more::after { display: none; }
#storeCategoriesSection.rabbit-categories .rabbit-category-empty { display: grid; flex: 1; min-height: 105px; place-items: center; padding: 18px; color: #777; font: 12px/1.5 sans-serif; text-align: center; }
#storeCategoriesSection.rabbit-categories .rabbit-category-arrow { display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 6; width: 42px; height: 42px; padding: 0; align-items: center; justify-content: center; border: 1px solid #0001; border-radius: 50%; background: #fffc; color: #111; box-shadow: 0 4px 14px #0003; font: 28px/1 sans-serif; cursor: pointer; }
#storeCategoriesSection.rabbit-categories .rabbit-category-arrow-prev { left: 8px; }
#storeCategoriesSection.rabbit-categories .rabbit-category-arrow-next { right: 8px; }
#storeCategoriesSection.rabbit-categories .rabbit-category-arrow:disabled { opacity: 0; pointer-events: none; }

@keyframes rabbitCategoryFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5%); } }
@keyframes rabbitCategoryShadow { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.8); opacity: .6; } }
@keyframes rabbitCategoryEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 768px) {
    #storeCategoriesSection.rabbit-categories { padding: 36px 0 28px; }
    #storeCategoriesSection.rabbit-categories .rabbit-category-product { flex-basis: calc((100% - 50px)/6); }
    #storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card > span { font-size: 16px; }
}
@media (hover: hover) and (pointer: fine) {
    #storeCategoriesSection.rabbit-categories .rabbit-category-arrow { display: flex; }
}
@media (max-width: 500px) {
    #storeCategoriesSection.rabbit-categories { padding-top: 22px; }
    #storeCategoriesSection.rabbit-categories #storeCategoriesGrid { gap: 3px; padding: 0 10px; }
    #storeCategoriesSection.rabbit-categories #storeCategoriesGrid .category-card > span { font-size: clamp(8px,2.5vw,12px); }
    #storeCategoriesSection.rabbit-categories #storeCategoriesGrid .rabbit-category-code { font-size: 8px; }
    #storeCategoriesSection.rabbit-categories .rabbit-category-products { margin-top: 9px; padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
    #storeCategoriesSection.rabbit-categories .category-card img,
    #storeCategoriesSection.rabbit-categories .rabbit-category-shadow,
    #storeCategoriesSection.rabbit-categories .rabbit-category-product { animation: none; }
    #storeCategoriesSection.rabbit-categories .rabbit-category-glow { transition: none; }
}

/* Selector visual dentro de Apariencia > Categorías de la portada. */
#appearanceCategoriesCard .rabbit-category-style-picker { min-width: 0; margin: 18px 0 16px; padding: 0; border: 0; }
#appearanceCategoriesCard .rabbit-category-style-picker legend { margin-bottom: 10px; color: #24354d; font-size: 11px; font-weight: 850; }
#appearanceCategoriesCard .rabbit-category-style-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
#appearanceCategoriesCard .rabbit-category-style-choice { position: relative; display: block; min-width: 0; cursor: pointer; }
#appearanceCategoriesCard .rabbit-category-style-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#appearanceCategoriesCard .rabbit-category-style-card { display: flex; flex-direction: column; gap: 5px; height: 100%; padding: 10px; border: 1.5px solid #dce5f0; border-radius: 12px; background: #fbfcfe; transition: border-color .2s, box-shadow .2s; }
#appearanceCategoriesCard .rabbit-category-style-choice input:checked + .rabbit-category-style-card { border-color: #2369d3; box-shadow: 0 0 0 3px #2563eb1a; background: #f7faff; }
#appearanceCategoriesCard .rabbit-category-style-choice input:focus-visible + .rabbit-category-style-card { outline: 2px solid #2563eb; outline-offset: 3px; }
#appearanceCategoriesCard .rabbit-category-style-card strong { color: #22344b; font-size: 11px; line-height: 1.35; }
#appearanceCategoriesCard .rabbit-category-style-card strong small { display: inline-block; margin-left: 3px; padding: 2px 5px; border-radius: 4px; color: #12509c; background: #e7f0ff; font-size: 8px; }
#appearanceCategoriesCard .rabbit-category-style-card > span:last-child { color: #65758b; font-size: 9px; line-height: 1.5; }
#appearanceCategoriesCard .rabbit-category-style-mini { position: relative; display: flex; align-items: center; justify-content: space-around; height: 76px; overflow: hidden; border-radius: 7px; background: #fff; }
#appearanceCategoriesCard .rabbit-category-style-mini-rabbit { padding: 4px 10%; }
#appearanceCategoriesCard .rabbit-category-style-mini-rabbit > i { position: absolute; width: 43px; height: 43px; left: 8%; top: 17px; border-radius: 50%; background: radial-gradient(circle,#eee,#ccc5 65%,transparent 72%); }
#appearanceCategoriesCard .rabbit-category-style-mini-rabbit img { position: relative; z-index: 1; width: 28%; height: 68px; object-fit: contain; filter: drop-shadow(0 3px 3px #0003); }
#appearanceCategoriesCard .rabbit-category-style-mini-classic { gap: 5px; padding: 9px; }
#appearanceCategoriesCard .rabbit-category-style-mini-classic > i { display: block; flex: 1; height: 45px; background: linear-gradient(135deg,#a0a0a0,#656565); border-radius: 3px; }
#appearanceCategoriesCard .rabbit-category-style-mini-classic > i:nth-child(2) { background: linear-gradient(135deg,#8997a7,#35414b); }
#appearanceCategoriesCard .rabbit-category-style-mini-classic > i:nth-child(3) { background: linear-gradient(135deg,#9a8888,#5b4d4d); }
@media (max-width: 420px) { #appearanceCategoriesCard .rabbit-category-style-options { grid-template-columns: 1fr; } }
