/* ==========================================================================
   BriteGlow shop
   Visual language shared with the profile page (user_profile/index.html):
   same gradient cover, card system, accent palette and typography.
   All classes are prefixed with shop- so they cannot collide with Tailwind
   utilities or the profile-* styles.
   ========================================================================== */

.shop-page {
    --shop-accent: #1e90ff;
    --shop-accent-dark: #1565c0;
    --shop-accent-2: #7c3aed;
    --shop-bg: #f0f4f8;
    --shop-card: #ffffff;
    --shop-text: #1a202c;
    --shop-muted: #718096;
    --shop-border: #e2e8f0;
    --shop-radius: 16px;
    --shop-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shop-shadow-lg: 0 8px 40px rgba(30, 144, 255, 0.12);

    background: var(--shop-bg);
    min-height: 100vh;
    font-family: "Poppins", "Inter", system-ui, sans-serif;
    padding-bottom: 3rem;
    color: var(--shop-text);
}

.shop-page *,
.shop-page *::before,
.shop-page *::after {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Hero cover
   -------------------------------------------------------------------------- */

.shop-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 20px 84px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 40%, #7c3aed 100%);
    background-size: 400% 400%;
    animation: shopCoverShift 12s ease infinite;
}

.shop-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
}

@keyframes shopCoverShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.shop-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.shop-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.shop-hero-title {
    margin: 22px 0 0;
    color: #fff;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.shop-hero-sub {
    max-width: 560px;
    margin: 14px auto 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.65;
}

.shop-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.shop-cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.shop-cat:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: #fff;
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Content shell / section head
   -------------------------------------------------------------------------- */

.shop-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.shop-body {
    padding-top: 32px;
}

.shop-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.shop-section-head h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.shop-section-head p {
    margin: 4px 0 0;
    color: var(--shop-muted);
    font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Product grid + cards
   -------------------------------------------------------------------------- */

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

.shop-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    text-decoration: none;
    color: var(--shop-text);
    transition: box-shadow 0.3s ease, transform 0.2s ease, border-color 0.2s ease;
}

.shop-card:hover {
    box-shadow: var(--shop-shadow-lg);
    transform: translateY(-3px);
    border-color: #bfdbfe;
}

.shop-card-media {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #eef2f7, #f7fafc);
}

.shop-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.shop-card:hover .shop-card-media img {
    transform: scale(1.06);
}

.shop-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px 16px 16px;
}

.shop-card-cat {
    margin: 0 0 4px;
    color: var(--shop-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.shop-card-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--shop-text);
}

.shop-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}

.shop-card-price {
    color: var(--shop-accent-dark);
    font-size: 1rem;
    font-weight: 700;
}

.shop-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--shop-accent);
    font-size: 0.8rem;
    font-weight: 700;
}

.shop-card-cta svg {
    transition: transform 0.2s ease;
}

.shop-card:hover .shop-card-cta svg {
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.shop-empty {
    grid-column: 1 / -1;
    padding: 56px 24px;
    background: var(--shop-card);
    border: 1px dashed #cbd5e1;
    border-radius: var(--shop-radius);
    text-align: center;
}

.shop-empty-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 14px;
    color: #cbd5e1;
}

.shop-empty h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.shop-empty p {
    margin: 8px auto 0;
    max-width: 400px;
    color: var(--shop-muted);
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Toolbar (search + category bar) — section page
   -------------------------------------------------------------------------- */

.shop-toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 26px;
}

.shop-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 4px 4px 18px;
    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    border-radius: 999px;
    box-shadow: var(--shop-shadow);
}

.shop-search input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 0.95rem;
    color: var(--shop-text);
}

.shop-search input::placeholder {
    color: var(--shop-muted);
}

.shop-search button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--shop-accent);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.shop-search button:hover {
    background: var(--shop-accent-dark);
}

.shop-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid var(--shop-border);
    border-radius: 999px;
    background: var(--shop-card);
    color: var(--shop-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.shop-tab:hover {
    border-color: #bfdbfe;
    color: var(--shop-accent-dark);
}

.shop-tab.is-active {
    background: var(--shop-accent);
    border-color: var(--shop-accent);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Product detail
   -------------------------------------------------------------------------- */

.shop-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.shop-product-media {
    overflow: hidden;
    border-radius: var(--shop-radius);
    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    box-shadow: var(--shop-shadow);
}

.shop-product-media img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
}

.shop-product-card {
    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    padding: 26px;
}

.shop-product-cat {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    color: var(--shop-accent-dark);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shop-product-card h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.shop-price {
    margin: 14px 0 0;
    color: var(--shop-text);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.shop-price small {
    color: var(--shop-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.shop-product-desc {
    margin: 14px 0 0;
    color: var(--shop-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.shop-product-form {
    margin-top: 22px;
}

.shop-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
}

.shop-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 140px;
    min-width: 130px;
}

.shop-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--shop-text);
}

.shop-field input,
.shop-field select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--shop-border);
    border-radius: 10px;
    background: #f8faff;
    font: inherit;
    font-size: 0.92rem;
    color: var(--shop-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.shop-field input:focus,
.shop-field select:focus {
    outline: none;
    border-color: var(--shop-accent);
    box-shadow: 0 0 0 4px rgba(30, 144, 255, 0.12);
}

.shop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 12px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.shop-btn-primary {
    background: var(--shop-accent);
    color: #fff;
    box-shadow: 0 8px 20px rgba(30, 144, 255, 0.25);
}

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

.shop-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.shop-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.shop-alert-warn {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.shop-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* --------------------------------------------------------------------------
   Cart
   -------------------------------------------------------------------------- */

.shop-cart-head {
    margin: 24px 0 20px;
}

.shop-cart-head h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.shop-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.shop-cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.shop-cart-item {
    display: flex;
    gap: 16px;
    padding: 14px;
    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
}

.shop-cart-item-media {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    border-radius: 12px;
    overflow: hidden;
    background: #eef2f7;
}

.shop-cart-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-cart-item-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shop-cart-item-name {
    font-size: 1rem;
    font-weight: 600;
}

.shop-cart-item-meta {
    color: var(--shop-muted);
    font-size: 0.82rem;
}

.shop-cart-item-price {
    font-weight: 700;
    color: var(--shop-accent-dark);
}

.shop-qty {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
    border: 1px solid var(--shop-border);
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
}

.shop-qty a,
.shop-qty button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    background: #f8faff;
    color: var(--shop-text);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.shop-qty a:hover,
.shop-qty button:hover {
    background: #eef2f7;
}

.shop-qty span {
    min-width: 34px;
    text-align: center;
    font-weight: 700;
}

.shop-summary {
    position: sticky;
    top: 16px;
    padding: 22px;
    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
}

.shop-summary h2 {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.shop-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--shop-border);
}

.shop-summary-row:first-of-type {
    border-top: 0;
}

.shop-summary-row .label {
    color: var(--shop-muted);
    font-size: 0.88rem;
}

.shop-summary-row .value {
    font-weight: 700;
    font-size: 1.05rem;
}

.shop-summary .shop-btn {
    width: 100%;
    margin-top: 16px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
    .shop-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .shop-cart-layout {
        grid-template-columns: 1fr;
    }

    .shop-summary {
        position: static;
    }
}

@media (max-width: 820px) {
    .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-product {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .shop-hero {
        padding: 52px 16px 64px;
    }

    .shop-product-card {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shop-hero {
        animation: none;
    }
    .shop-card,
    .shop-card-media img,
    .shop-btn,
    .shop-cat,
    .shop-tab {
        transition: none;
    }
}
