/* --------------------------------------------------
   Google Fonts
-------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&family=Patrick+Hand&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');


/* --------------------------------------------------
   Design tokens
-------------------------------------------------- */

:root {
    --sharabeek-cream: #fffaf2;
    --sharabeek-purple: #59548b;
    --sharabeek-purple-dark: #4c4779;
    --sharabeek-blush: #f3d8d6;
    --sharabeek-lavender: #e9e3f1;
    --sharabeek-yellow: #fff0b8;
    --sharabeek-mauve: #8d7790;

    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-pill: 9999px;

    --shadow-sm: 0 1px 3px rgba(89,84,139,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(89,84,139,.10), 0 2px 6px rgba(0,0,0,.05);
    --shadow-lg: 0 12px 40px rgba(89,84,139,.14), 0 4px 12px rgba(0,0,0,.07);
}


/* --------------------------------------------------
   Base / Typography
-------------------------------------------------- */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-serif,
[class*="font-serif"] {
    font-family: 'Playfair Display', Georgia, serif;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.site-background :is(h1, h2, h3, h4, h5, h6),
.site-background .section-title,
.site-background .sh-banner h2 {
    font-family: 'Patrick Hand', 'Inter', system-ui, sans-serif !important;
}

.product-detail-description,
.product-detail-description *,
.product-detail-fields,
.product-detail-fields * {
    font-family: 'Indie Flower', 'Inter', system-ui, sans-serif !important;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}


/* --------------------------------------------------
   Sharabeek artistic background
-------------------------------------------------- */

.site-background {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(
            ellipse 500px 380px at -5% 8%,
            rgba(243, 216, 214, 0.55),
            transparent 70%
        ),
        radial-gradient(
            ellipse 420px 500px at 105% 25%,
            rgba(255, 240, 184, 0.30),
            transparent 70%
        ),
        radial-gradient(
            ellipse 480px 420px at -8% 62%,
            rgba(233, 227, 241, 0.42),
            transparent 70%
        ),
        radial-gradient(
            ellipse 520px 400px at 105% 88%,
            rgba(243, 216, 214, 0.42),
            transparent 70%
        ),
        #fffaf2;
}


/* Fine handmade-looking curves */

.site-background::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background:
        radial-gradient(
            ellipse 500px 300px at -5% 15%,
            transparent 69%,
            rgba(180, 126, 135, 0.24) 69.5%,
            rgba(180, 126, 135, 0.24) 70%,
            transparent 70.5%
        ),
        radial-gradient(
            ellipse 650px 350px at 105% 85%,
            transparent 69%,
            rgba(180, 126, 135, 0.20) 69.5%,
            rgba(180, 126, 135, 0.20) 70%,
            transparent 70.5%
        );
}


/* --------------------------------------------------
   Dark mode
-------------------------------------------------- */

.dark .site-background {
    background:
        radial-gradient(
            ellipse 500px 380px at -5% 8%,
            rgba(119, 83, 112, 0.16),
            transparent 70%
        ),
        radial-gradient(
            ellipse 420px 500px at 105% 25%,
            rgba(142, 122, 70, 0.10),
            transparent 70%
        ),
        radial-gradient(
            ellipse 480px 420px at -8% 62%,
            rgba(91, 82, 130, 0.15),
            transparent 70%
        ),
        radial-gradient(
            ellipse 520px 400px at 105% 88%,
            rgba(119, 83, 112, 0.12),
            transparent 70%
        ),
        #080b10;
}


.dark .site-background::before {
    opacity: 0.45;
}


/* --------------------------------------------------
   Crochet decorations
-------------------------------------------------- */

.crochet-decoration {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    color: var(--sharabeek-purple);
    opacity: 0.11;
}

.crochet-decoration svg {
    display: block;
    width: 100%;
    height: 100%;
}


/* Crochet hook / thread — right side */

.crochet-hook {
    right: -25px;
    top: 68%;
    width: 150px;
    height: 150px;
    transform: rotate(15deg);
}


/* Dark mode */

.dark .crochet-decoration {
    color: #c8c2e0;
    opacity: 0.08;
}


/* Keep decorations smaller on phones */

@media (max-width: 640px) {
    .crochet-hook {
        right: -40px;
        width: 115px;
        height: 115px;
    }
}


/* --------------------------------------------------
   Forms & Inputs
-------------------------------------------------- */

.field-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e5dede;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.75);
    font-family: inherit;
    font-size: 0.9375rem;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field-input::placeholder {
    color: #bbb;
}

.field-input:focus {
    border-color: var(--sharabeek-purple);
    background: rgba(255,255,255,0.95);
    box-shadow: 0 0 0 3px rgba(89,84,139,0.10);
}

.dark .field-input {
    border-color: #3a3a4a;
    background: rgba(20,18,32,0.7);
    color: #f0eeff;
}

.dark .field-input:focus {
    border-color: #8880be;
    background: rgba(20,18,32,0.9);
    box-shadow: 0 0 0 3px rgba(89,84,139,0.18);
}

.field-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #555;
    letter-spacing: 0.01em;
}

.dark .field-label {
    color: #c0bbd8;
}


/* --------------------------------------------------
   Buttons
-------------------------------------------------- */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-pill);
    background: var(--sharabeek-purple);
    color: #fff;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 18px rgba(89,84,139,0.22);
    border: none;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.btn-primary:hover {
    background: var(--sharabeek-purple-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(89,84,139,0.30);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-pill);
    background: transparent;
    border: 1.5px solid #d4cce0;
    color: var(--sharabeek-purple);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.btn-secondary:hover {
    border-color: var(--sharabeek-purple);
    background: rgba(89,84,139,0.06);
    transform: translateY(-1px);
}

.dark .btn-secondary {
    border-color: #5a5475;
    color: #c8c2e0;
}

.dark .btn-secondary:hover {
    border-color: #9990c8;
    background: rgba(89,84,139,0.18);
    color: #fff;
}

.btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    background: #111;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.15s ease;
}

.btn-dark:hover {
    background: #222;
    transform: translateY(-1px);
}

.btn-dark:disabled {
    background: #e5e5e5;
    color: #999;
    cursor: not-allowed;
    transform: none;
}



/* --------------------------------------------------
   Cards
-------------------------------------------------- */

.card {
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(234,223,216,0.7);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.dark .card {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.08);
}


/* --------------------------------------------------
   Badges
-------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.badge-neutral {
    background: rgba(0,0,0,0.06);
    color: #555;
}

.badge-sold {
    background: rgba(255,255,255,0.92);
    color: #333;
    backdrop-filter: blur(8px);
}

.badge-sale {
    background: #e5484d;
    color: #fff;
}

.badge-green {
    background: #ecfdf5;
    color: #166534;
}

.dark .badge-neutral {
    background: rgba(255,255,255,0.10);
    color: #c0bbd8;
}

.dark .badge-green {
    background: rgba(22,101,52,0.25);
    color: #86efac;
}


/* --------------------------------------------------
   Page headers (shop/events/category)
-------------------------------------------------- */

.page-header {
    padding: 3rem 0 2.5rem;
    border-bottom: 1px solid rgba(234,223,216,0.6);
}

.dark .page-header {
    border-color: rgba(255,255,255,0.07);
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 600;
    color: #1a1a24;
    letter-spacing: -0.025em;
}

.dark .page-header h1 {
    color: #f0eeff;
}

.page-header p {
    margin-top: 0.6rem;
    font-size: 1rem;
    color: #777;
    max-width: 40ch;
}

.dark .page-header p {
    color: #a09ab8;
}


/* --------------------------------------------------
   Product card polish
-------------------------------------------------- */

.product-card-image {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #f0ebe6;
}

.dark .product-card-image {
    background: #1e1c2a;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(.4,0,.2,1);
}

.product-card-image:hover img {
    transform: scale(1.05);
}

.product-card-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a24;
    transition: color 0.15s ease;
}

.dark .product-card-name {
    color: #e8e4f8;
}

.product-card-category {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: none;
    color: var(--sharabeek-mauve);
}

.dark .product-card-category {
    color: #9990c0;
}

.product-card-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a24;
}

.dark .product-card-price {
    color: #e8e4f8;
}


/* --------------------------------------------------
   Section dividers
-------------------------------------------------- */

.section-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sharabeek-mauve);
}

.dark .section-label {
    color: #aaa3c2;
}

.section-title {
    margin-top: 0.6rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    color: #1a1a24;
    line-height: 1.15;
}

.dark .section-title {
    color: #f0eeff;
}


/* --------------------------------------------------
   Breadcrumb
-------------------------------------------------- */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: #999;
}

.breadcrumb a {
    color: #888;
    transition: color 0.15s ease;
}

.breadcrumb a:hover {
    color: var(--sharabeek-purple);
}

.dark .breadcrumb {
    color: #6b6585;
}

.dark .breadcrumb a {
    color: #7a7498;
}

.dark .breadcrumb a:hover {
    color: #c8c2e0;
}


/* --------------------------------------------------
   Responsive container utility
-------------------------------------------------- */

.container-site {
    width: 100%;
    max-width: 80rem;   /* 1280px */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-site {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-site {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}


/* --------------------------------------------------
   Filter pill (shop page)
-------------------------------------------------- */

.filter-pill {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    border: 1.5px solid #e2d9e8;
    font-size: 0.8125rem;
    color: #666;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    user-select: none;
}

.filter-pill:hover {
    border-color: var(--sharabeek-purple);
    color: var(--sharabeek-purple);
}

.filter-pill.active,
input[type="radio"]:checked + .filter-pill {
    border-color: #1a1a24;
    background: #1a1a24;
    color: #fff;
}

.dark .filter-pill {
    border-color: #3a3650;
    color: #a09ab8;
}

.dark .filter-pill:hover {
    border-color: #8880be;
    color: #c8c2e0;
}

.dark .filter-pill.active,
.dark input[type="radio"]:checked + .filter-pill {
    border-color: #f0eeff;
    background: #f0eeff;
    color: #1a1a24;
}


/* --------------------------------------------------
   Smooth focus ring (accessibility)
-------------------------------------------------- */

:focus-visible {
    outline: 2px solid var(--sharabeek-purple);
    outline-offset: 3px;
    border-radius: 4px;
}


/* --------------------------------------------------
   Transitions
-------------------------------------------------- */

a, button {
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}


/* --------------------------------------------------
   Messages / alerts
-------------------------------------------------- */

.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-success {
    background: #ecfdf5;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-info {
    background: rgba(233,227,241,0.7);
    color: #4c3d6d;
    border-color: rgba(89,84,139,0.2);
}

.dark .alert-success {
    background: rgba(22,101,52,0.18);
    color: #86efac;
    border-color: rgba(22,101,52,0.35);
}

.dark .alert-error {
    background: rgba(153,27,27,0.18);
    color: #fca5a5;
    border-color: rgba(153,27,27,0.35);
}

.dark .alert-info {
    background: rgba(89,84,139,0.18);
    color: #c8c2e0;
    border-color: rgba(89,84,139,0.30);
}


/* --------------------------------------------------
   Scrollbar (webkit)
-------------------------------------------------- */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(89,84,139,0.25);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(89,84,139,0.45);
}


/* --------------------------------------------------
   Page header — responsive tweaks
-------------------------------------------------- */

.page-header {
    padding: 2.5rem 0 2rem;
}

@media (min-width: 640px) {
    .page-header {
        padding: 3rem 0 2.5rem;
    }
}


/* --------------------------------------------------
   Product card — mobile improvements
-------------------------------------------------- */

@media (max-width: 480px) {
    .product-card-name {
        font-size: 0.875rem;
    }

    .product-card-price {
        font-size: 0.875rem;
    }
}


/* --------------------------------------------------
   Forms — touch-friendly sizing
-------------------------------------------------- */

@media (max-width: 640px) {
    .field-input {
        font-size: 1rem; /* Prevents iOS zoom on focus */
    }
}


/* --------------------------------------------------
   Buttons — mobile sizing
-------------------------------------------------- */

@media (max-width: 480px) {
    .btn-primary {
        padding: 0.8rem 1.4rem;
        font-size: 0.875rem;
    }

    .btn-secondary {
        padding: 0.75rem 1.3rem;
        font-size: 0.875rem;
    }
}


/* --------------------------------------------------
   Event detail map — responsive
-------------------------------------------------- */

.event-description p {
    margin-bottom: 1rem;
}

.event-description p:last-child {
    margin-bottom: 0;
}

.event-description strong,
.event-description b {
    font-weight: 600;
}

.event-description a {
    color: var(--sharabeek-purple);
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* --------------------------------------------------
   Checkout — responsive order summary
-------------------------------------------------- */

@media (max-width: 1023px) {
    .checkout-summary-sticky {
        position: static !important;
    }
}


/* --------------------------------------------------
   Product detail — contained, direction-aware gallery
-------------------------------------------------- */
.product-detail-page {
    --gallery-height: 70vh;
    width: 100%;
    max-width: 80rem;
    margin-inline: auto;
    padding: 1.25rem 1rem 3rem;
}
.product-detail-breadcrumb { margin-block-end: 1.25rem; overflow: hidden; }
.product-detail-layout { display: grid; gap: 2rem; align-items: start; }
.product-detail-gallery { display: grid; gap: 1rem; min-width: 0; }
.product-detail-main { order: 1; min-width: 0; }
.product-detail-media { width: fit-content; max-width: 100%; margin-inline: auto; }
.product-detail-media--empty { width: 100%; }
.product-detail-photo { position: relative; }
.product-detail-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: var(--gallery-height);
    object-fit: contain;
    border-radius: 1.5rem;
}
.product-detail-sold { position: absolute; inset-block-start: .75rem; inset-inline-end: .75rem; }
.product-detail-placeholder { display: grid; place-items: center; aspect-ratio: 4 / 5; max-height: var(--gallery-height); border-radius: 1.5rem; }
.product-detail-actions { margin-block-start: 1rem; }
.product-detail-actions > div { margin-top: 0; }
.product-detail-thumbnail-rail { order: 2; min-width: 0; }
.product-detail-thumbnails {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .25rem;
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
}
.product-detail-thumbnails .product-thumbnail {
    flex: 0 0 4rem;
    width: 4rem;
    height: 4.75rem;
    padding: 2px;
    border-width: 2px;
    border-radius: .75rem;
    transition: opacity .15s, border-color .15s;
}
.product-detail-thumbnails .product-thumbnail[aria-pressed="true"] { border-color: var(--sharabeek-purple); opacity: 1; }
.product-detail-thumbnails img { width: 100%; height: 100%; object-fit: contain; border-radius: .5rem; }
.product-thumbnail:focus-visible,
.product-thumbnail-page:focus-visible { outline: 2px solid var(--sharabeek-purple); outline-offset: 2px; }
.product-thumbnail-page { display: none; }
.product-detail-info { min-width: 0; overflow-wrap: anywhere; }
.product-detail-category { display: inline-block; padding: .3rem .7rem; border-radius: 999px; background: rgb(89 84 139 / .06); }
.product-detail-title { margin-block-start: .75rem; font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1.12; }
.product-detail-price { margin-block-start: 1.25rem; }
.product-detail-description { margin-block-start: 1.5rem; font-size: 1.25rem; font-weight: 600; }
.product-detail-description :is(p, ul, ol) { margin-block-end: 1rem; }
.product-detail-description a { text-decoration: underline; text-underline-offset: .2em; }
.product-detail-fields { font-size: 1.25rem; font-weight: 400; line-height: 1.4; }
.site-background .product-detail-field-label { font-family: 'Patrick Hand', 'Inter', system-ui, sans-serif !important; font-size: 1.25rem; font-weight: 700; }
.product-detail-value { min-width: 0; text-align: end; }
@media (min-width: 640px) {
    .product-detail-page { padding-inline: 1.5rem; }
}
@media (min-width: 1024px) {
    /* Reserve space for the existing overlapping logo on this page only. */
    body:has(.product-detail-page) > header > div > div { margin-bottom: 3.5rem; }
    .product-detail-page { --gallery-height: clamp(450px, 55vh, 540px); padding: 1.5rem 2rem 4rem; }
    .product-detail-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 3vw, 3rem); }
    .product-detail-gallery--thumbnails { grid-template-columns: 4.5rem minmax(0, 1fr); }
    .product-detail-gallery--multiple { grid-template-columns: 8.5rem minmax(0, 1fr); }
    .product-detail-main { order: 2; }
    .product-detail-thumbnail-rail { order: 1; }
    .product-detail-thumbnails {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        max-height: var(--gallery-height);
        overflow-x: hidden;
        overflow-y: auto;
    }
    .product-detail-gallery--multiple .product-detail-thumbnails { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-detail-thumbnails .product-thumbnail { width: 100%; height: min(5.5rem, calc((var(--gallery-height) - 2.5rem) / 5)); }
    .product-detail-thumbnail-rail--overflow .product-detail-thumbnails { max-height: calc(var(--gallery-height) - 4rem); }
    .product-detail-thumbnail-rail--overflow { display: grid; gap: .25rem; }
    .product-thumbnail-page {
        display: grid;
        place-items: center;
        width: 100%;
        min-height: 1.75rem;
        border: 1px solid rgb(89 84 139 / .25);
        border-radius: .6rem;
        color: var(--sharabeek-purple);
        background: rgb(89 84 139 / .04);
        font-size: 1.25rem;
    }
    .product-detail-info { padding-block-start: .5rem; }
}

/* --------------------------------------------------
   Reduced motion
-------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
