/* ============================================
   EcoFarmacia - Shop styles
   ============================================ */

:root {
    --eco-primary: #2e8b57;
    --eco-primary-dark: #1f6b41;
    --eco-accent: #ff6b35;
    --eco-bg: #f7faf8;
}

body {
    background: var(--eco-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Header ---------- */
.shop-header {
    z-index: 1030;
}
.brand-link {
    color: inherit;
    display: inline-flex;
    align-items: center;
}
.brand-logo {
    font-size: 1.5rem;
}
.brand-name {
    color: var(--eco-primary);
    font-size: 1.15rem;
}
.shop-nav .nav-link {
    color: #495057;
    padding: 0.4rem 0.9rem;
}
.shop-nav .nav-link:hover {
    color: var(--eco-primary);
}

/* ---------- Hero / Banner ---------- */
.offer-banner-img {
    max-height: 400px;
    object-fit: cover;
}
.offer-banner-fallback {
    min-height: 240px;
    border-radius: 12px;
}

/* ---------- Category nav ---------- */
.category-tile {
    display: block;
    transition: transform .15s ease;
}
.category-tile:hover {
    transform: translateY(-3px);
}
.category-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}
.category-icon img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

/* ---------- Product card ---------- */
.product-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
    background: #fff;
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .1) !important;
}
.product-img {
    height: 180px;
    object-fit: contain;
    padding: 12px;
    background: #fff;
}
.product-title {
    font-size: .95rem;
    line-height: 1.25;
    min-height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-badge-offer {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}
.product-badge-bio {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    font-size: .65rem;
}

.product-scroll-item {
    flex: 0 0 220px;
    max-width: 220px;
}

/* ---------- Filter sidebar ---------- */
.filter-sidebar {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #e9ecef;
    position: sticky;
    top: 110px;
}

/* ---------- Product detail ---------- */
.product-detail-main {
    max-height: 500px;
    object-fit: contain;
    background: #fff;
    padding: 1rem;
}
.thumb-btn {
    width: 60px;
    height: 60px;
    border: 2px solid #e9ecef;
    background: #fff;
    border-radius: 6px;
    padding: 4px;
    cursor: pointer;
}
.thumb-btn.active {
    border-color: var(--eco-primary);
}
.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ---------- Cart drawer ---------- */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, .15);
    z-index: 1080;
    transition: right .25s ease;
    display: flex;
    flex-direction: column;
}
.cart-drawer.open {
    right: 0;
}
.cart-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
}
.cart-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 1070;
}
.cart-item-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 4px;
}

/* ---------- Footer ---------- */
.shop-footer h5, .shop-footer h6 {
    color: #fff;
}
.shop-footer a {
    text-decoration: none;
}
.shop-footer a:hover {
    color: #fff !important;
    text-decoration: underline;
}
.social-links a {
    font-size: 1.3rem;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 991.98px) {
    .filter-sidebar {
        position: static;
    }
    .product-img {
        height: 140px;
    }
}
