/**
 * css/pages/shop.css
 * ===================
 * Shop page layout, hero badge, card grid, sidebar, and filter bar.
 * Loaded only by pages/shop.html.
 * Shared component .category-filter-btn lives in outback-theme.css.
 */

/* -- Hero elements ------------------------------------------------------- */

.shop-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--theme-text-muted);
    margin-bottom: var(--belle-space-sm);
    font-family: var(--theme-font-sans);
}

.shop-hero-image {
    border-radius: var(--theme-radius-md);
    overflow: hidden;
    border: 3px solid var(--theme-primary);
}

.shop-hero-image img {
    width: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.shop-hero-note {
    margin-top: var(--belle-space-md);
    font-size: 0.9375rem;
    color: var(--theme-text-light);
}

/* -- Main layout --------------------------------------------------------- */

.shop-layout {
    padding: var(--belle-space-xl) 0 var(--belle-space-2xl);
}

.shop-layout-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    gap: var(--belle-space-xl);
}

@media (max-width: 900px) {
    .shop-layout-inner {
        grid-template-columns: 1fr;
    }
}

/* -- Category filter bar ------------------------------------------------- */

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--belle-space-sm);
    margin-bottom: var(--belle-space-lg);
    padding: var(--belle-space-md) 0;
    border-bottom: 1px solid var(--theme-border);
}

/* -- Product card -------------------------------------------------------- */

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

.shop-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--belle-space-md);
}

.shop-card-name {
    min-height: 2.5rem;
    line-height: 1.25;
}

.shop-card-description {
    min-height: 3rem;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.shop-card-category {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--theme-text-light);
    margin-bottom: var(--belle-space-xs);
}

.shop-card-footer {
    margin-top: var(--belle-space-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-card-status {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--theme-text-light);
}

/* Push variable-price controls and add button to bottom of card */
.variations-container,
.portions-container {
    margin-top: auto !important;
}

.shop-card-add-btn {
    margin-top: 1rem !important;
}

.shop-card-price:not(.variation-price):not(.portion-price) {
    margin-top: auto;
}

/* -- Empty state --------------------------------------------------------- */

.shop-empty {
    padding: var(--belle-space-xl) 0;
    text-align: center;
    color: var(--theme-text-light);
    font-size: 0.9375rem;
}

/* -- Sidebar ------------------------------------------------------------- */

.shop-sidebar {
    border-left: 1px solid var(--theme-border);
    padding-left: var(--belle-space-lg);
}

@media (max-width: 900px) {
    .shop-sidebar {
        border-left: none;
        border-top: 1px solid var(--theme-border);
        padding-left: 0;
        padding-top: var(--belle-space-lg);
    }
}

.shop-sidebar-group {
    margin-bottom: var(--belle-space-lg);
}

.shop-sidebar-title {
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--theme-text-muted);
    margin-bottom: var(--belle-space-sm);
    font-family: var(--theme-font-sans);
    font-weight: 600;
}

.shop-sidebar-note {
    font-size: 0.9375rem;
    color: var(--theme-text-muted);
    line-height: 1.7;
}

.shop-filter-list {
    list-style: none;
}

.shop-filter-list button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0;
    background: none;
    border: none;
    color: var(--theme-text-muted);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--belle-transition);
    font-family: var(--theme-font-sans);
}

.shop-filter-list button:hover,
.shop-filter-list button.shop-filter-active {
    color: var(--theme-primary);
}

.shop-filter-list button.shop-filter-active {
    font-weight: 600;
}
/* -- Interactive Menu Styles --------------------------------------------- */

.menu-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--belle-space-md);
    padding: var(--belle-space-sm) var(--belle-space-md);
    background: var(--theme-bg-alt);
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius-sm);
}

.image-toggle-container {
    display: flex;
    align-items: center;
    gap: var(--belle-space-sm);
    font-size: 0.875rem;
    color: var(--theme-text-muted);
    cursor: pointer;
    user-select: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--theme-border);
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--theme-primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* -- Compact Menu View --------------------------------------------------- */

.page-shop.hide-images .shop-card-image {
    display: none;
}

.page-shop.hide-images .shop-grid {
    grid-template-columns: 1fr;
    gap: var(--belle-space-sm);
}

.page-shop.hide-images .shop-card {
    flex-direction: row;
    align-items: center;
    padding: var(--belle-space-sm) var(--belle-space-md);
    border-bottom: 1px solid var(--theme-border);
    background: transparent;
    box-shadow: none;
    height: auto;
}

.page-shop.hide-images .shop-card-body {
    padding: 0;
}

.page-shop.hide-images .shop-card-name {
    min-height: 0;
    margin-bottom: 0.25rem;
}

.page-shop.hide-images .shop-card-description {
    min-height: 0;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    margin-bottom: 0.5rem;
}

.page-shop.hide-images .shop-card-footer {
    margin-top: 0;
}

.page-shop.hide-images .shop-card-add-btn {
    width: auto;
    padding: 0.5rem 1rem;
    margin-top: 0 !important;
}

@media (max-width: 600px) {
    .page-shop.hide-images .shop-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Override grid to 2 columns on desktop, 1 on mobile */
.page-shop:not(.hide-images) .shop-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--belle-space-xl) !important;
}
@media (max-width: 900px) {
    .page-shop:not(.hide-images) .shop-grid {
        grid-template-columns: 1fr !important;
    }
}
