/* =========================================================
   Store Index Page
   ========================================================= */

:root {
    --store-primary: #0f7cff;
    --store-primary-dark: #005fd1;
    --store-primary-hover: #005fd1;
    --store-primary-soft: #eef6ff;
    --store-text: #111827;
    --store-muted: #6b7280;
    --store-border: #e5e7eb;
    --store-card-border: #eeeeee;
    --store-bg: #f9fafb;
    --store-white: #ffffff;
    --store-radius: 16px;
    --store-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    --store-shadow-soft: 0 10px 24px rgba(15, 124, 255, 0.12);
    --store-header-height: 80px;
    --store-section-x: clamp(52px, 16vw, 102px);
}

.store-page {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--store-bg);
    padding: var(--store-header-height) 0 34px;
}

.store-page.is-rtl {
    direction: rtl;
}

.store-page.is-ltr {
    direction: ltr;
}

/* =========================================================
   Shared Section Width
   ========================================================= */

.category-pills-section,
.store-search-section,
.bestsellers-section,
.subscriptions-tabs-section {
    width: 100%;
    max-width: 1600px;
    box-sizing: border-box;
    padding-left: var(--store-section-x);
    padding-right: var(--store-section-x);
    margin-left: auto;
    margin-right: auto;
}

.category-pills-section,
.bestsellers-section {
    margin-bottom: 24px;
}

.store-search-section {
    margin-bottom: 28px;
}

/* =========================================================
   Full Width Store Hero
   ========================================================= */

.store-hero-section {
    position: relative;
    width: 100vw;
    min-height: 350px;
    margin-top: 0;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-image:
        linear-gradient(
            90deg,
            rgba(15, 23, 42, 0.88) 0%,
            rgba(15, 23, 42, 0.73) 42%,
            rgba(15, 23, 42, 0.38) 72%,
            rgba(15, 23, 42, 0.16) 100%
        ),
        var(--store-hero-image);
    background-size: cover;
    background-position: center;
}

.store-page.is-rtl .store-hero-section {
    background-image:
        linear-gradient(
            -90deg,
            rgba(15, 23, 42, 0.88) 0%,
            rgba(15, 23, 42, 0.73) 42%,
            rgba(15, 23, 42, 0.38) 72%,
            rgba(15, 23, 42, 0.16) 100%
        ),
        var(--store-hero-image);
}

.store-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1600px;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 48px var(--store-section-x);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 26px;
}

.store-hero-content {
    max-width: 690px;
}

.store-kicker {
    width: fit-content;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--store-primary-soft);
    color: var(--store-primary);
    font-size: 13px;
    font-weight: 600;
}

.store-hero-content .store-kicker {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.store-hero-content h1 {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 46px;
    line-height: 1.08;
    font-weight: 600;
}

.store-hero-content p {
    max-width: 630px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 16px;
    line-height: 1.75;
}

.store-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.22s ease;
}

.hero-btn-primary {
    background: var(--store-primary);
    color: #ffffff;
}

.hero-btn-primary:hover {
    background: var(--store-primary-dark);
    transform: translateY(-2px);
}

.hero-btn-light {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.hero-btn-light:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.store-hero-section .store-highlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.store-hero-section .store-highlight {
    display: grid;
    grid-template-columns: 38px 1fr;
    column-gap: 12px;
    align-items: center;
    padding: 13px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.store-hero-section .store-highlight i {
    grid-row: span 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 16px;
}

.store-hero-section .store-highlight strong {
    color: #ffffff;
    font-size: 23px;
    line-height: 1;
    font-weight: 600;
}

.store-hero-section .store-highlight span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

/* =========================================================
   Section Header
   ========================================================= */

.section-top,
.products-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}

.section-top span,
.products-section-header span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    color: var(--store-primary);
    font-size: 15px;
    font-weight: 600;
}

.section-top h2,
.products-section-header h2 {
    color: var(--store-text);
    font-size: 30px;
    line-height: 1.22;
    font-weight: 600;
}

.section-top p,
.products-section-header p {
    color: var(--store-muted);
    font-size: 14px;
    line-height: 1.7;
}

.products-section-header strong {
    flex: 0 0 auto;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--store-border);
    background: var(--store-white);
    color: var(--store-text);
    font-size: 14px;
    font-weight: 600;
}

/* =========================================================
   Category Pills
   ========================================================= */

.category-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.category-pill {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--store-border);
    background: var(--store-white);
    color: var(--store-text);
    text-decoration: none;
    font-size: 14px;
    transition: 0.22s ease;
}

.category-pill i {
    color: var(--store-primary);
}

.category-pill small {
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--store-primary-soft);
    color: var(--store-primary);
    font-size: 12px;
}

.category-pill:hover {
    transform: translateY(-2px);
    border-color: #99caff;
    box-shadow: var(--store-shadow-soft);
}

.category-pill.active {
    border-color: var(--store-primary);
    background: var(--store-primary);
    color: #ffffff;
}

.category-pill.active i {
    color: #ffffff;
}

.category-pill.active small {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* =========================================================
   Search
   ========================================================= */

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin-bottom: 0;
    border: 1px solid var(--store-border);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--store-shadow);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.search-form:focus-within {
    border-color: var(--store-primary);
    box-shadow: 0 0 0 4px rgba(15, 124, 255, 0.12), var(--store-shadow);
    transform: translateY(-1px);
}

.search-input-box {
    flex: 1;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}

.search-input-box i {
    color: var(--store-primary);
    font-size: 15px;
    transition: transform 0.22s ease;
}

.search-input-box:focus-within i {
    transform: scale(1.08);
}

.search-input-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--store-text);
    font-size: 15px;
}

.search-input-box input::placeholder {
    color: #9ca3af;
}

.search-category select {
    height: 42px;
    min-width: 170px;
    padding: 0 10px;
    border: 1px solid var(--store-border);
    border-radius: 10px;
    background: #f9fafb;
    color: var(--store-text);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.22s ease, background 0.22s ease;
}

.search-category select:hover,
.search-category select:focus {
    border-color: var(--store-primary);
    background: #ffffff;
    outline: none;
}

.search-actions {
    display: flex;
    gap: 6px;
}

.btn-search,
.btn-reset {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.22s ease;
}

.btn-search {
    background: var(--store-primary);
    color: #ffffff;
}

.btn-search:hover {
    background: var(--store-primary-dark);
    transform: translateY(-1px);
}

.btn-reset {
    background: #f3f4f6;
    color: #444444;
}

.btn-reset:hover {
    background: #e5e7eb;
}

/* =========================================================
   Bestsellers Swiper Slider
   ========================================================= */

.bestseller-slider-shell {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 10px;
}

.bestseller-nav {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--store-border);
    border-radius: 50%;
    background: var(--store-white);
    color: var(--store-primary);
    cursor: pointer;
    transition: 0.22s ease;
}

.bestseller-nav:hover {
    border-color: var(--store-primary);
    background: var(--store-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.bestseller-nav.swiper-button-disabled {
    pointer-events: none;
    opacity: 0.4;
}

.bestseller-swiper {
    width: 100%;
    padding: 4px;
}

.bestseller-swiper .swiper-slide {
    height: auto;
}

.bestseller-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--store-card-border);
    border-radius: 16px;
    background: var(--store-white);
    color: inherit;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.bestseller-card:hover {
    transform: translateY(-4px);
    border-color: #99caff;
    box-shadow: var(--store-shadow-soft);
}

.bestseller-image {
    position: relative;
    height: 150px;
    overflow: hidden;
    background: var(--store-primary-soft);
}

.bestseller-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.bestseller-card:hover .bestseller-image img {
    transform: scale(1.035);
}

.bestseller-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 13px;
}

.bestseller-category {
    width: fit-content;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--store-primary-soft);
    color: var(--store-primary);
    font-size: 11px;
    font-weight: 600;
}

.bestseller-content h3 {
    color: var(--store-text);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
}

.bestseller-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    color: var(--store-primary);
    font-size: 13px;
    font-weight: 600;
}

/* =========================================================
   Product Cards
   ========================================================= */

.subscriptions-box {
    width: 100%;
}

.subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.subscription-card {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--store-card-border);
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.subscription-card:hover {
    transform: translateY(-4px);
    border-color: #99caff;
    box-shadow: var(--store-shadow-soft);
}

.subscription-image {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: var(--store-primary-soft);
}

.subscription-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.subscription-card:hover .subscription-image img {
    transform: scale(1.035);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--store-primary);
    font-size: 24px;
}

.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 4px 7px;
    border-radius: 6px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
}

.store-page.is-rtl .discount-badge {
    right: 8px;
    left: auto;
}

.subscription-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.subscription-header {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.subscription-header h3 {
    color: var(--store-text);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

.subscription-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.old-price {
    color: #9ca3af;
    font-size: 12px;
    text-decoration: line-through;
}

.subscription-price {
    width: fit-content;
    padding: 6px 9px;
    border-radius: 8px;
    background: var(--store-primary);
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}

.subscription-description {
    margin-bottom: 10px;
    color: var(--store-muted);
    font-size: 13px;
    line-height: 1.7;
}

.subscription-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}

.badge {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border: 1px solid #cfe6ff;
    border-radius: 999px;
    background: var(--store-primary-soft);
    color: var(--store-primary);
    font-size: 11px;
}

.badge-soft {
    border-color: #e5e7eb;
    background: #f8fafc;
    color: #4b5563;
}

.order-btn {
    width: 100%;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    border-radius: 10px;
    background: var(--store-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    transition: background 0.22s ease, box-shadow 0.22s ease;
}

.subscription-card:hover .order-btn {
    background: var(--store-primary-hover);
    box-shadow: 0 10px 22px rgba(15, 124, 255, 0.22);
}

.order-btn i,
.bestseller-link i {
    transition: transform 0.22s ease;
}

.subscription-card:hover .order-btn i,
.bestseller-card:hover .bestseller-link i {
    transform: translateX(3px);
}

.store-page.is-rtl .subscription-card:hover .order-btn i,
.store-page.is-rtl .bestseller-card:hover .bestseller-link i {
    transform: translateX(-3px);
}

/* =========================================================
   Empty State
   ========================================================= */

.no-results {
    grid-column: 1 / -1;
    padding: 60px 20px;
    border: 1px dashed #cfe6ff;
    border-radius: 16px;
    background: #ffffff;
    text-align: center;
}

.no-results-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--store-primary-soft);
    color: var(--store-primary);
    font-size: 22px;
}

.no-results h3 {
    margin-bottom: 8px;
    color: var(--store-text);
    font-size: 18px;
    font-weight: 600;
}

.no-results p {
    margin-bottom: 18px;
    color: var(--store-muted);
    font-size: 15px;
}

.no-results-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--store-primary);
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
}

.no-results-link:hover {
    background: var(--store-primary-dark);
}

/* =========================================================
   Pagination
   ========================================================= */

.navigator-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.navigator-container a {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--store-border);
    border-radius: 9px;
    background: #f8fafc;
    color: #374151;
    text-decoration: none;
    font-size: 15px;
    transition: 0.2s ease;
}

.navigator-container a:hover {
    border-color: #99caff;
    background: #eef6ff;
    color: var(--store-primary);
}

.navigator-container a.active {
    border-color: var(--store-primary);
    background: var(--store-primary);
    color: #ffffff;
    font-weight: 600;
}

.navigator-container a.disabled {
    pointer-events: none;
    opacity: 0.45;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1320px) {
    .subscriptions-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .store-hero-inner {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .store-hero-section .store-highlights {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .subscriptions-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .store-page {
        --store-section-x: 14px;
        padding-top: 0;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 28px;
    }

    .store-hero-section {
        min-height: auto;
        background-position: center;
    }

    .store-hero-inner {
        padding: 46px 14px;
    }

    .store-hero-content h1 {
        font-size: 37px;
    }

    .store-hero-content p {
        font-size: 15px;
    }

    .store-hero-section .store-highlights {
        grid-template-columns: 1fr;
    }

    .category-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .category-pills::-webkit-scrollbar {
        display: none;
    }

    .category-pill {
        flex: 0 0 auto;
    }

    .search-form {
        flex-wrap: wrap;
        gap: 10px;
    }

    .search-input-box {
        flex: 1 1 100%;
    }

    .search-category {
        flex: 1;
    }

    .search-category select {
        width: 100%;
        min-width: 0;
    }

    .products-section-header,
    .section-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-top h2,
    .products-section-header h2 {
        font-size: 26px;
    }

    .bestseller-slider-shell {
        grid-template-columns: 1fr;
    }

    .bestseller-nav {
        display: none;
    }

    .subscriptions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .subscription-image {
        height: 150px;
    }
}

@media (max-width: 600px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }

    .search-input-box,
    .search-category,
    .search-actions {
        width: 100%;
    }

    .search-actions {
        display: flex;
        justify-content: space-between;
    }

    .btn-search,
    .btn-reset {
        flex: 1;
        width: auto;
    }
}

@media (max-width: 560px) {
    .store-hero-inner {
        padding: 40px 14px;
    }

    .store-hero-content h1 {
        font-size: 31px;
    }

    .store-hero-actions {
        flex-direction: column;
    }

    .hero-btn {
        width: 100%;
    }

    .subscriptions-grid {
        grid-template-columns: 1fr;
    }

    .subscription-image {
        height: 185px;
    }

    .navigator-container a {
        min-width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

/* =========================================================
   Very Large Screens
   ========================================================= */

@media (min-width: 1600px) {
    .category-pills-section,
    .store-search-section,
    .bestsellers-section,
    .subscriptions-tabs-section,
    .store-hero-inner {
        max-width: 1760px;
    }

    .subscriptions-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (min-width: 1900px) {
    .category-pills-section,
    .store-search-section,
    .bestsellers-section,
    .subscriptions-tabs-section,
    .store-hero-inner {
        max-width: 1900px;
    }

    .store-hero-section {
        min-height: 390px;
    }

    .store-hero-content h1 {
        font-size: 54px;
    }

    .subscriptions-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .subscription-image {
        height: 170px;
    }
}

@media (min-width: 2300px) {
    .category-pills-section,
    .store-search-section,
    .bestsellers-section,
    .subscriptions-tabs-section,
    .store-hero-inner {
        max-width: 2100px;
    }

    .subscriptions-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}
