/**
 * Categories Drawer Styles
 * Displays category cards stacked one below the other (single column)
 * with the exact same design, overlay, and white banner as the Categories section.
 */

.categories-drawer .drawer-content {
    left: auto;
    right: 0;
    transform: translateX(100%);
    width: 85%;
    max-width: 360px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.opsim-drawer.categories-drawer.is-active .drawer-content {
    transform: translateX(0);
}

.categories-drawer .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--opsim-border, #e2e8f0);
    background: #ffffff;
    flex-shrink: 0;
}

.categories-drawer .drawer-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--opsim-text-primary, #1e293b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.categories-drawer .drawer-close {
    color: var(--opsim-text-primary, #1e293b) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.categories-drawer .drawer-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    display: block;
}

.categories-drawer .drawer-close:hover {
    color: var(--opsim-brand, #531628) !important;
    background: rgba(0, 0, 0, 0.05) !important;
    opacity: 1;
}

.categories-drawer .drawer-body {
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

/* Vertical stack: one below the other (NOT a grid) */
.categories-drawer .categories-list,
.categories-drawer .categories-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    box-sizing: border-box;
}

/* Category Card - exact same look and style as the section */
.categories-drawer .category-card {
    position: relative;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    flex: 0 0 auto !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: var(--opsim-radius, 10px) !important;
    overflow: hidden;
    text-decoration: none;
    background-color: #f1f5f9;
    box-shadow: none !important;
    border: none !important;
    transform: none !important;
    transition: none !important;
    box-sizing: border-box;
}

.categories-drawer .category-image-wrapper,
.categories-drawer .category-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #f8fafc;
}

.categories-drawer .category-image-wrapper img,
.categories-drawer .category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border: none;
    outline: none;
    transform: none !important;
    transition: none !important;
}

/* Category Overlay - exact same full static overlay covering the entire image */
.categories-drawer .category-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.36);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 6px 6px 6px;
    box-sizing: border-box;
    pointer-events: none;
}

/* Category Title Banner - exact same white background, brand color text, identity border-radius */
.categories-drawer .category-title,
.categories-drawer .category-name {
    background-color: #ffffff !important;
    color: var(--fp-accent, var(--opsim-brand, #531628)) !important;
    font-family: var(--opsim-font-secondary, inherit);
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0;
    padding: 6px 10px !important;
    line-height: 1.2;
    text-align: center;
    border-radius: var(--opsim-radius, 6px) !important;
    box-shadow: none !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    text-shadow: none !important;
    transform: none !important;
    transition: none !important;
}

.categories-drawer .no-categories {
    padding: 24px;
    text-align: center;
    color: var(--opsim-text-secondary, #64748b);
    font-size: 0.85rem;
}

@media (max-width: 767px) {
    .categories-drawer .drawer-content {
        width: 86%;
        max-width: 340px;
    }

    .categories-drawer .categories-list,
    .categories-drawer .categories-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px;
        padding: 14px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .categories-drawer .category-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        flex: 0 0 auto !important;
        aspect-ratio: 16 / 9 !important;
        border-radius: var(--opsim-radius, 10px) !important;
        display: block !important;
    }

    .categories-drawer .category-overlay {
        padding: 0 6px 6px 6px;
    }

    .categories-drawer .category-title,
    .categories-drawer .category-name {
        font-size: 11px !important;
        padding: 6px 10px !important;
        border-radius: var(--opsim-radius, 6px) !important;
    }
}
