/* ============================================================
   Shop Frontend - Category Sidebar + Products Grid
   ============================================================ */

.odoo-shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- SEARCH BAR ---- */
.shop-search-bar {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 600px;
    margin: 0 auto 2rem;
    height: 50px;
    background: #fff;
    border: 2px solid #d4a55a;
    border-radius: 25px;
    padding: 3px;
    overflow: hidden;
    transition: border-color .25s, box-shadow .25s;
}

.shop-search-bar:focus-within {
    border-color: #b8882e;
    box-shadow: 0 0 0 3px rgba(212,165,90,.15);
}

.shop-search-input {
    flex: 1;
    height: 44px;
    border: none;
    background: transparent;
    padding: 0 1.2rem;
    font-size: .95rem;
    color: #333;
    outline: none;
}

.shop-search-input::placeholder { color: #aaa; }

.shop-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    height: 44px;
    padding: 0 1.5rem;
    background: linear-gradient(135deg, #ff8c42 0%, #ff7a29 100%);
    color: #fff;
    border: none;
    border-radius: 22px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.shop-search-btn svg { width: 15px; height: 15px; }

.shop-search-btn:hover {
    background: linear-gradient(135deg, #e57a30 0%, #e06616 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(255,140,66,.35);
}

/* ---- LAYOUT ---- */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { 
        border-bottom: 1px solid #e5e5e5;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
}

/* ---- SIDEBAR ---- */
.shop-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 1rem;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .65rem .85rem;
    margin-bottom: .35rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    background: #f8f8f8;
}

.category-item:hover {
    background: #fff4ec;
    transform: translateX(3px);
}

.category-item.active {
    background: linear-gradient(135deg, #ff8c42 0%, #ff7a29 100%);
    color: #fff;
    font-weight: 600;
}

.cat-name {
    font-size: .88rem;
}

.cat-count {
    font-size: .75rem;
    opacity: .75;
    background: rgba(0,0,0,.1);
    padding: .15rem .45rem;
    border-radius: 12px;
}

.category-item.active .cat-count {
    background: rgba(255,255,255,.25);
}

/* ---- MAIN AREA ---- */
.shop-main {
    min-height: 400px;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #e5e5e5;
}

.results-info {
    font-size: .92rem;
    color: #666;
}

.shop-sort-select {
    padding: .5rem .85rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: .88rem;
    cursor: pointer;
    background: #fff;
    outline: none;
}

.shop-sort-select:focus {
    border-color: #ff8c42;
    box-shadow: 0 0 0 2px rgba(255,140,66,.15);
}

/* ---- PRODUCTS GRID ---- */
.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
    .shop-products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
    .shop-products-grid { grid-template-columns: repeat(2, 1fr); gap: .85rem; }
}

/* Use shared product card styles from branch-search.css */
.shop-products-grid .product-card {
    max-width: 100%;
}

/* ---- PAGINATION ---- */
.shop-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    padding: 1.5rem 0;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 .75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #555;
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.page-btn:hover {
    border-color: #ff8c42;
    background: #fff4ec;
    color: #ff8c42;
}

.page-btn.active {
    border-color: #ff8c42;
    background: #ff8c42;
    color: #fff;
    font-weight: 600;
}

.page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.page-btn:disabled:hover {
    border-color: #ddd;
    background: #fff;
    color: #555;
}

.page-info {
    font-size: .88rem;
    color: #666;
    margin: 0 .5rem;
}

/* ---- LOADING STATE ---- */
.shop-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.shop-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #ff8c42;
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.shop-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.shop-empty svg {
    width: 60px;
    height: 60px;
    opacity: .3;
    margin-bottom: .75rem;
}

.shop-empty h3 {
    font-size: 1.15rem;
    color: #666;
    margin: .5rem 0 .25rem;
}
