/* HybriShop home page - matches "HybriShop Homepage Concept".
   Everything is prefixed .hy- so it cannot clash with the theme. */

:root {
    --hy-red: #d31d07;
    --hy-red-deep: #990f04;
    --hy-price: #b3180a;
    --hy-tint: #ffece8;
    --hy-tint-line: #f6d4cc;
    --hy-strip: #fbeee5;
    --hy-grey: #f5f7f6;
    --hy-line: #e9edec;
    --hy-ink: #1c1d22;
    --hy-text: #4b4f56;
    --hy-muted: #8b9096;
}

.hy-search a:focus-visible,
.hy-welcome a:focus-visible,
.hy-hero a:focus-visible,
.hy-coupon a:focus-visible,
.hy-seller a:focus-visible,
.hy-section a:focus-visible,
.hy-search input:focus-visible,
.hy-search button:focus-visible {
    outline: 2px solid var(--hy-red);
    outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.hy-btn-red {
    display: inline-block;
    background: var(--hy-red);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    padding: 13px 26px;
    border: 0;
    border-radius: 999px;
    text-align: center;
    cursor: pointer;
}
.hy-btn-red:hover { background: var(--hy-red-deep); color: #fff; }
.hy-btn-wide { display: block; width: 100%; font-size: 16px; padding: 15px 20px; }

.hy-btn-outline {
    display: inline-block;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    padding: 12px 24px;
    border: 2px solid #fff;
    border-radius: 999px;
    white-space: nowrap;
}
.hy-btn-outline:hover { background: #fff; color: var(--hy-red); }

/* ---------- Search ---------- */
.hy-search { padding: 14px 0 12px; background: #fff; }
.hy-search-form { max-width: 680px; margin: 0 auto; }
.hy-search-box {
    position: relative;
    display: block;
    margin: 0 0 12px;
}
.hy-search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--hy-muted);
}
.hy-search-box input {
    width: 100%;
    height: 46px;
    padding: 0 18px 0 44px;
    border: 1px solid #cdd3d1;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    color: var(--hy-ink);
}
.hy-search-box input::placeholder { color: var(--hy-muted); }

/* ---------- Welcome bar ---------- */
.hy-welcome { background: var(--hy-grey); }
.hy-welcome-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.hy-welcome strong { font-size: 17px; font-weight: 600; color: var(--hy-ink); }
.hy-welcome-links { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.hy-welcome-links a { font-size: 13px; font-weight: 600; color: var(--hy-ink); }
.hy-welcome-links a:hover { color: var(--hy-red); }

/* ---------- Hero grid ---------- */
.hy-hero { padding: 18px 0 14px; }
.hy-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hy-pick,
.hy-hot,
.hy-cats {
    background: #fff;
    border: 1px solid var(--hy-line);
    border-radius: 12px;
}

.hy-pick {
    display: flex;
    flex-direction: column;
    padding: 14px;
    color: var(--hy-ink);
}
.hy-pick:hover { border-color: var(--hy-tint-line); color: var(--hy-ink); }
.hy-pick-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.hy-pick-sub { font-size: 12px; color: var(--hy-text); margin-top: 2px; }
.hy-pick-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 12px;
}
.hy-pick-img img {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.hy-hot {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px;
    background: linear-gradient(180deg, var(--hy-tint) 0%, #fff 70%);
    border-color: var(--hy-tint-line);
    text-align: center;
}
.hy-hot-title { font-size: 20px; font-weight: 700; color: #6b1000; margin: 4px 0 12px; }
.hy-hot-img { flex: 1; display: flex; align-items: center; width: 100%; }
.hy-hot-img img { width: 100%; border-radius: 8px; }
.hy-hot .hy-btn-red { margin-top: 14px; }

/* Category list (desktop only) */
.hy-cats { position: relative; padding: 8px 0; }
.hy-cats ul { list-style: none; margin: 0; padding: 0; }
.hy-cat > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    font-size: 13px;
    color: #272727;
}
.hy-cat > a img { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; flex: none; }
.hy-cat > a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hy-cat > a i { font-size: 12px; color: var(--hy-muted); }
.hy-cat:hover > a { background: var(--hy-tint); color: var(--hy-red); }

.hy-cat-fly {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    z-index: 30;
    min-width: 230px;
    min-height: 100%;
    padding: 10px 0;
    background: #fff;
    border: 1px solid var(--hy-line);
    border-radius: 0 12px 12px 0;
    box-shadow: 0 12px 28px rgba(28, 29, 34, 0.1);
}
.hy-cat:hover > .hy-cat-fly { display: block; }
.hy-cat-fly a { display: block; padding: 7px 18px; font-size: 13px; color: var(--hy-text); }
.hy-cat-fly a:hover { color: var(--hy-red); background: var(--hy-tint); }

@media (min-width: 768px) {
    .hy-hero-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
}
@media (min-width: 1200px) {
    .hy-hero-grid {
        grid-template-columns: 1.15fr 1fr 1fr 1fr 1.45fr;
        min-height: 400px;
    }
}

/* ---------- Coupon strip ---------- */
.hy-coupon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    margin-bottom: 14px;
    padding: 12px 18px;
    background: var(--hy-strip);
    border-radius: 10px;
    font-size: 13px;
    color: var(--hy-text);
}
.hy-coupon p { margin: 0; }
.hy-coupon strong { color: #8a1304; margin-right: 6px; }
.hy-coupon a { font-weight: 700; color: var(--hy-ink); }
.hy-coupon a:hover { color: var(--hy-red); }

/* ---------- Seller banner ---------- */
.hy-seller {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 22px;
    padding: 26px 28px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(90deg, #d31c0a 0%, #b41802 55%, #990f04 100%);
}
.hy-seller h2 { margin: 0 0 6px; font-size: 26px; font-weight: 700; color: #fff; }
.hy-seller p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.92); }
.hy-seller-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Product sections ---------- */
.hy-section { padding: 6px 0 20px; }
.hy-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}
.hy-section-head h2 { margin: 0; font-size: 22px; font-weight: 700; color: #040300; }
.hy-section-head a { font-size: 13px; font-weight: 700; color: var(--hy-red); }
.hy-section-head a:hover { color: var(--hy-red-deep); }

.hy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
@media (min-width: 576px)  { .hy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px)  { .hy-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 992px)  { .hy-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .hy-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.hy-card {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--hy-line);
    border-radius: 10px;
    color: var(--hy-text);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.hy-card:hover {
    border-color: var(--hy-tint-line);
    box-shadow: 0 8px 22px rgba(28, 29, 34, 0.08);
    color: var(--hy-text);
}
.hy-card-img {
    display: block;
    aspect-ratio: 1 / 1;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}
.hy-card-img img { width: 100%; height: 100%; object-fit: contain; }

.hy-price { display: block; line-height: 1.3; }
.hy-price b { font-size: 16px; font-weight: 700; color: var(--hy-price); }
.hy-price del { margin-left: 6px; font-size: 12px; color: var(--hy-muted); }

.hy-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    margin: 4px 0;
    font-size: 13px;
    line-height: 1.35;
    color: var(--hy-text);
}
.hy-card .hy-name:last-child { margin-bottom: 0; }


/* ---------- Just For You (endless scroll) ---------- */
.hy-feed-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 16px 0 4px;
    font-size: 13px;
    color: var(--hy-muted);
}
.hy-feed-status:empty { min-height: 0; padding: 0; }
.hy-feed-retry { padding: 9px 18px; font-size: 13px; }
#hy-feed-sentinel { height: 1px; }
.hy-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--hy-tint-line);
    border-top-color: var(--hy-red);
    border-radius: 50%;
    animation: hy-spin 0.8s linear infinite;
}
@keyframes hy-spin { to { transform: rotate(360deg); } }

/* ---------- Small screens ---------- */
@media (max-width: 575px) {
    .hy-seller { padding: 20px 18px; }
    .hy-seller h2 { font-size: 21px; }
    .hy-seller-actions { width: 100%; }
    .hy-seller-actions .hy-btn-outline { flex: 1; text-align: center; padding-left: 12px; padding-right: 12px; }
    .hy-section-head h2 { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    .hy-card { transition: none; }
    .hy-spinner { animation-duration: 2.4s; }
}
