/* ============================================================
   Odoo Product Sync — Frontend Styles
   Designed to complement the Gintea/Elementor tea theme
   ============================================================ */

/* ----- Section wrapper ----- */
.ops-section {
    margin: 2rem 0;
    font-family: inherit;
}

.ops-section-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    color: #1a1a1a;
}

/* ----- Product Grid ----- */
.ops-product-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.ops-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ops-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ops-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ops-cols-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 900px) {
    .ops-cols-3,
    .ops-cols-4,
    .ops-cols-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .ops-product-grid { grid-template-columns: 1fr; }
}

/* ----- Product Card ----- */
.ops-product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.ops-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.ops-product-image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f5f0eb;
}

.ops-product-image-link img,
.ops-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.ops-product-card:hover .ops-product-image-link img {
    transform: scale(1.05);
}

.ops-product-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ops-product-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.ops-product-name a {
    color: #1a1a1a;
    text-decoration: none;
}

.ops-product-name a:hover { color: #2e7d32; }

.ops-product-desc {
    font-size: 0.82rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.ops-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.75rem;
}

.ops-product-price {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* ----- Buttons ----- */
.ops-btn {
    display: inline-block;
    padding: 0.45rem 1rem;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    letter-spacing: 0.03em;
}

.ops-btn-primary {
    background: #1a1a1a;
    color: #fff;
    border: 2px solid #1a1a1a;
}

.ops-btn-primary:hover {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}

.ops-btn-outline {
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
}

.ops-btn-outline:hover {
    background: #1a1a1a;
    color: #fff;
}

/* ----- View All ----- */
.ops-view-all {
    text-align: center;
    margin-top: 2rem;
}

/* ----- Featured Row (Mood Setters style) ----- */
.ops-featured-row {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-top: 1.5rem;
    scroll-snap-type: x mandatory;
}

.ops-featured-row::-webkit-scrollbar { height: 4px; }
.ops-featured-row::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.ops-featured-item {
    flex: 0 0 160px;
    scroll-snap-align: start;
}

.ops-featured-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.ops-featured-image {
    width: 140px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f0eb;
}

.ops-featured-item:hover .ops-featured-image img {
    transform: scale(1.06);
}

.ops-featured-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ops-featured-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
}

.ops-featured-price {
    font-size: 0.82rem;
    color: #555;
}

/* ----- Category Circles (Shop by Mood style) ----- */
.ops-category-circles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 1rem;
    margin-top: 1.5rem;
}

.ops-category-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.ops-category-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ops-category-item:hover .ops-category-circle {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.ops-cat-initial {
    color: rgba(0,0,0,0.55);
}

.ops-category-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    color: #333;
    max-width: 90px;
    line-height: 1.2;
}

/* ----- Error / Notice ----- */
.ops-notice {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border-left: 4px solid #ccc;
    background: #f9f9f9;
}

.ops-error {
    border-color: #e53e3e;
    background: #fff5f5;
    color: #c53030;
}

.ops-error p { margin: 0; font-size: 0.9rem; }

/* ----- Category circle: real image (from Odoo eCommerce category) ----- */
.ops-has-image .ops-category-circle {
    background: #f5f0eb;
    overflow: hidden;
    padding: 0;
}

.ops-has-image .ops-category-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ops-has-image:hover .ops-category-circle img {
    transform: scale(1.1);
}

/* ----- Category circle: coloured initial fallback ----- */
.ops-cat-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: rgba(0,0,0,0.5);
}

/* ----- Admin hint (only visible to admins) ----- */
.ops-admin-hint {
    text-align: center;
    font-size: 0.82rem;
    color: #888;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #fffbe6;
    border-radius: 6px;
    border: 1px solid #ffe58f;
}
