/* ====================================================
   AUTO PARTS STORE PAGE — MODERN DESIGN
   ==================================================== */

.store-page {
    background: #f8fafc;
    min-height: 100vh;
}

/* ====================================================
   HERO BANNER
   ==================================================== */

.store-hero {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #0f172a;
}
.store-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    display: block;
}
.store-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(15,23,42,0.72) 0%, rgba(15,23,42,0.2) 60%, transparent 100%);
}

/* ====================================================
   STORE HEADER
   ==================================================== */

.store-header-wrap {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.store-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
}

/* Left */
.store-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.store-logo-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 1.5px solid #f1f5f9;
    background: #f8fafc;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.store-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.store-logo-fallback {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #13618C, #297B35);
    letter-spacing: 0.5px;
}
.store-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.store-name {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.store-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #297B35;
}

/* Right */
.store-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Header search */
.store-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.store-search-icon {
    position: absolute;
    left: 12px;
    pointer-events: none;
    flex-shrink: 0;
}
.store-header-search-input {
    height: 38px;
    width: 220px;
    padding: 0 14px 0 36px;
    font-size: 13px;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.store-header-search-input::placeholder { color: #94a3b8; }
.store-header-search-input:focus {
    border-color: #13618C;
    box-shadow: 0 0 0 3px rgba(19,97,140,0.08);
    background: #fff;
}

/* ====================================================
   STORE BODY / LAYOUT
   ==================================================== */

.store-body {
    padding: 24px 0 64px;
}

/* ====================================================
   CATEGORY PILL BAR
   ==================================================== */

.store-cat-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 0 16px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .store-cat-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 12px;
    }
    .store-cat-bar::-webkit-scrollbar { display: none; }
    .store-subcat-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .store-subcat-bar::-webkit-scrollbar { display: none; }
}

.store-cat-pill {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #fff;
    border: 1.5px solid #f1f5f9;
    border-radius: 30px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}
.store-cat-pill:hover {
    border-color: #cbd5e1;
    color: #334155;
}
.store-cat-pill.selected {
    background: linear-gradient(135deg, #13618C, #297B35);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(19,97,140,0.2);
}

/* Sub-category row */
.store-subcat-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 12px 0 16px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 20px;
}
.store-subcat-pill {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border: 1.5px solid #f1f5f9;
    border-radius: 30px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.store-subcat-pill:hover {
    border-color: #cbd5e1;
    color: #334155;
    background: #fff;
}
.store-subcat-pill.selected {
    background: rgba(19,97,140,0.08);
    border-color: #13618C;
    color: #13618C;
}

/* ====================================================
   PRODUCTS AREA
   ==================================================== */

.store-main-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.store-product-count {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
}

/* Products grid */
.store-products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

/* Empty state */
.store-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 24px;
    text-align: center;
}
.store-empty h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 16px 0 6px;
}
.store-empty p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* Product card */
.store-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.store-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.store-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card image */
.store-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.store-card-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.2s;
}
.store-card:hover .store-card-img { transform: scale(1.04); }

/* Discount badge — corner tag */
.discount-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(to right, #288CCB, #49A644);
    color: #fff;
    padding: 4px 10px;
    border-radius: 10px 0 10px 0;
    font-size: 10px;
    font-weight: 700;
    z-index: 10;
    letter-spacing: 0.2px;
}

/* Card info */
.store-card-info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    border-top: 1px solid #f8fafc;
}
.store-card-title {
    font-size: 11px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.store-card-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}
.store-card-prices {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.store-card-original {
    font-size: 10px;
    color: #94a3b8;
    text-decoration: line-through;
}
.store-card-current {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
}
.store-card-cart {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}
.store-card-cart img { width: 13px; height: 13px; object-fit: contain; }
.store-card-cart:hover {
    background: linear-gradient(135deg, #13618C, #297B35);
    border-color: transparent;
}
.store-card-cart:hover img { filter: brightness(0) invert(1); }

/* ====================================================
   RESPONSIVE
   ==================================================== */

@media (max-width: 1200px) {
    .store-products-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 960px) {
    .store-products-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .store-hero { height: 140px; }
    .store-header { flex-wrap: wrap; gap: 12px; }
    .store-header-right { width: 100%; }
    .store-products-grid { grid-template-columns: repeat(3, 1fr); }
    .store-name { font-size: 15px; }
}
@media (max-width: 480px) {
    .store-products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
