/* ============================================================
   Robotics & Electric Components - e-commerce shop styling
   (Daraz-style cards, badges, gallery, sticky mobile buy bar).
   Same visual language/class names as digitalproducts/shop.css,
   just this app's own blue gradient identity for the hero.
   Shared by product_list.html and product_detail.html.
   ============================================================ */

/* ---- Hero ---- */
.shop-hero {
    background: linear-gradient(135deg, var(--secondary-color, #0E2A5C) 0%, var(--primary-color, #0EA5E9) 100%);
    border-radius: 18px;
    padding: 32px 28px;
    color: #fff;
    margin-bottom: 22px;
}
.shop-hero h1 { font-weight: 800; font-size: clamp(22px, 4vw, 32px); margin-bottom: 8px; }
.shop-hero p { opacity: .92; margin-bottom: 0; }
@media (max-width: 767px) {
    .shop-hero { padding: 20px 18px; border-radius: 14px; }
}

/* ---- Category strip ---- */
.shop-category-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scrollbar-width: none;
    margin-bottom: 18px;
}
.shop-category-strip::-webkit-scrollbar { display: none; }
.shop-category-chip {
    flex: 0 0 auto;
    width: 92px;
    text-align: center;
    text-decoration: none;
    color: #111827;
}
.shop-category-chip-icon {
    width: 64px; height: 64px; border-radius: 18px;
    background: #f1f5f9; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 6px; font-size: 24px; color: var(--primary-color, #0EA5E9);
    transition: transform .15s ease, background .15s ease;
}
.shop-category-chip:hover .shop-category-chip-icon { background: #e0f2fe; transform: translateY(-2px); }
.shop-category-chip.active .shop-category-chip-icon { background: var(--primary-color, #0EA5E9); color: #fff; }
.shop-category-chip-name { font-size: 11.5px; font-weight: 600; display: block; line-height: 1.25; }

/* ---- Filter bar ---- */
.shop-filter-bar {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 14px; margin-bottom: 20px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.shop-filter-bar input[type="text"] { flex: 1 1 220px; min-width: 160px; }
.shop-filter-bar select { flex: 0 1 200px; min-width: 150px; }

/* ---- Product grid + card ---- */
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 576px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .shop-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 992px) { .shop-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1200px) { .shop-grid { grid-template-columns: repeat(6, 1fr); } }

.shop-card {
    position: relative;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.shop-card:hover { box-shadow: 0 12px 26px rgba(15,23,42,.09); transform: translateY(-3px); border-color: #e2e8f0; color: inherit; }

.shop-card-img { position: relative; aspect-ratio: 1 / 1; background: #f8fafc; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.shop-card-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-card-img .shop-card-placeholder { color: #cbd5e1; font-size: 2.2rem; }

.shop-ribbon-discount {
    position: absolute; top: 8px; left: 8px;
    background: #ef4444; color: #fff; font-size: 11px; font-weight: 800;
    padding: 3px 8px; border-radius: 999px; z-index: 2;
}
.shop-ribbon-badge {
    position: absolute; top: 8px; right: 8px;
    font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; z-index: 2;
}
.shop-ribbon-featured { background: #f59e0b; color: #fff; }
.shop-ribbon-new { background: var(--primary-color, #0EA5E9); color: #fff; }
.shop-ribbon-outofstock { background: #6b7280; color: #fff; }

.shop-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.shop-card-title {
    font-size: 12.5px; font-weight: 600; color: #111827; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.6em;
}
.shop-card-price-row { margin-top: auto; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.shop-card-price { font-size: 14px; font-weight: 800; color: var(--primary-color, #0EA5E9); }
.shop-card-price-original { font-size: 11px; color: #9ca3af; text-decoration: line-through; }
.shop-card-meta { font-size: 10.5px; color: #9ca3af; }

/* ---- Gallery (product detail) ---- */
.shop-gallery-main { border-radius: 14px; overflow: hidden; background: #f8fafc; height: 340px; display: flex; align-items: center; justify-content: center; }
.shop-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.shop-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.shop-gallery-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; cursor: pointer; }
.shop-gallery-thumbs img.active { border-color: var(--primary-color, #0EA5E9); border-width: 2px; }

/* ---- Discount price banner (detail page) ---- */
.shop-price-banner { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.shop-price-banner .now { font-size: 1.8rem; font-weight: 800; color: var(--primary-color, #0EA5E9); }
.shop-price-banner .was { font-size: 1rem; color: #9ca3af; text-decoration: line-through; }

/* ---- Sticky mobile buy bar ---- */
.shop-sticky-cta { display: none; }
@media (max-width: 991.98px) {
    .shop-sticky-cta {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
        background: #fff; border-top: 1px solid #e5e7eb;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 14px rgba(0,0,0,.06);
        gap: 10px;
    }
    .shop-sticky-cta .btn { flex: 1; }
    body.has-shop-sticky-cta { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- Empty state ---- */
.shop-empty { text-align: center; padding: 60px 20px; color: #6b7280; }

/* ---- SEO content block (same visual language as classifieds' city-seo block) ---- */
.seo-highlights {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    padding: 28px 24px;
}
.seo-benefits-list { list-style: disc inside; padding-left: 0; margin: 0; color: #475569; }
.seo-benefits-list li { margin-bottom: 8px; line-height: 1.6; font-size: 13px; }
.seo-card { display: flex; gap: 10px; align-items: flex-start; background: #fbfbff; padding: 12px; border-radius: 14px; }
.seo-card-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-top: 2px; flex-shrink: 0; }
.seo-card h6 { font-size: 14px; margin-bottom: 2px; }
.seo-card p { margin: 0; font-size: 12px; color: #64748b; }
.section-title { font-size: 18px; font-weight: 700; }
