/* ============================================================
   webshop.css — Product grids, basket & order form
   Unified with site-wide pet-boutique design system
   Fonts: Cormorant Garamond (display) + Jost (body)
   ============================================================ */

/* ── Design tokens (mirrors pb- and hs- variables) ── */
:root {
    --ws-cream:       #f7f3ee;
    --ws-sand:        #e8dfd3;
    --ws-forest:      #2d4a3e;
    --ws-forest-mid:  #3d6356;
    --ws-forest-lt:   #e8f0ed;
    --ws-gold:        #b8975a;
    --ws-gold-lt:     #d4b483;
    --ws-ink:         #1a1a18;
    --ws-ink-soft:    #4a4a46;
    --ws-muted:       #8a8680;
    --ws-white:       #ffffff;
    --ws-radius:      6px;
    --ws-shadow:      0 2px 12px rgba(26,26,24,0.06);
    --ws-shadow-hv:   0 8px 32px rgba(26,26,24,0.12);
    --ws-transition:  0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --ws-font-display: 'Dm Sans', Helvetica, serif;
    --ws-font-body:    'Dm Sans', Helvetica, serif;
}

/* ============================================================
   PAGE HEADER  (shared pb-page-header — same across all pages)
   ============================================================ */
.pb-page-header {
    text-align: center;
    padding: 4rem 1.5rem 3rem;
    background: var(--ws-cream);
    border-bottom: 1px solid var(--ws-sand);
}
.pb-page-header__eyebrow {
    font-family: var(--ws-font-body);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ws-gold);
    margin: 0 0 .75rem;
}
.pb-page-header__title {
    font-family: var(--ws-font-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 600;
    color: var(--ws-forest);
    margin: 0 0 1rem;
    line-height: 1.1;
}
.pb-page-header__subtitle {
    font-family: var(--ws-font-body);
    font-size: 1rem;
    font-weight: 300;
    color: var(--ws-ink-soft);
    max-width: 560px;
    margin: 0 auto 1.75rem;
    line-height: 1.7;
}
.pb-page-header__rule {
    display: block;
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--ws-gold), var(--ws-gold-lt));
    margin: 0 auto;
    border-radius: 2px;
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.75rem;
    margin: 2.5rem 0 3rem;
    background: transparent !important;
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.shop-card {
    background: var(--ws-white);
    border: 1px solid var(--ws-sand);
    border-radius: var(--ws-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--ws-shadow);
    transition: box-shadow var(--ws-transition), transform var(--ws-transition);
}
.shop-card:hover {
    box-shadow: var(--ws-shadow-hv);
    transform: translateY(-2px);
}

/* ---- Image wrap ---- */
.shop-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--ws-forest-lt);
    flex-shrink: 0;
}
.shop-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.shop-card:hover .shop-card__img-wrap img { transform: scale(1.04); }

.shop-card__img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(45,74,62,.08) 0%, transparent 55%);
    pointer-events: none;
}

/* Empty / placeholder */
.shop-card__img-wrap--empty {
    display: flex;
    align-items: center;
    justify-content: center;
}
.shop-card__placeholder-icon {
    width: 52px;
    height: 52px;
    color: var(--ws-forest);
}

/* ---- Category badge ---- */
.shop-cat-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    font-family: var(--ws-font-body);
    font-size: .6rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
    color: var(--ws-white);
    pointer-events: none;
    z-index: 1;
}
.shop-cat-tag--nosework     { background: var(--ws-forest); }
.shop-cat-tag--samehantverk,
.shop-cat-tag--samesl-jd   { background: var(--ws-gold); }

/* ---- Card body ---- */
.shop-card__body {
    padding: 1.2rem 1.25rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}
.shop-card__title {
    font-family: var(--ws-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ws-forest);
    margin: 0;
    line-height: 1.25;
    transition: color var(--ws-transition);
}
.shop-card:hover .shop-card__title { color: var(--ws-forest-mid); }

.shop-card__info {
    font-family: var(--ws-font-body);
    font-size: .85rem;
    font-weight: 300;
    color: var(--ws-muted);
    line-height: 1.65;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Card footer ---- */
.shop-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 12px;
    margin-top: auto;
    border-top: 1px solid var(--ws-sand);
}
.shop-card__price {
    font-family: var(--ws-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ws-gold);
}

/* ---- Add to basket button ---- */
.shop-btn-add {
    font-family: var(--ws-font-body);
    background: var(--ws-forest);
    color: var(--ws-white);
    border: none;
    border-radius: var(--ws-radius);
    padding: 8px 14px;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--ws-transition), transform .1s;
}
.shop-btn-add:hover  { background: var(--ws-forest-mid); }
.shop-btn-add:active { transform: scale(0.97); }
.shop-btn-add.added  { background: var(--ws-gold); }

/* ---- Empty state ---- */
.shop-empty {
    font-family: var(--ws-font-body);
    text-align: center;
    padding: 4rem 0;
    color: var(--ws-muted);
    font-style: italic;
    font-weight: 300;
}

/* ============================================================
   BASKET PAGE
   ============================================================ */
#shop-basket-page {
    background: transparent;
    padding: 2rem 0 5rem;
}

.basket-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    font-family: var(--ws-font-body);
    color: var(--ws-muted);
    font-weight: 300;
    font-size: 1rem;
}

/* ---- Sections ---- */
.basket-section {
    max-width: 820px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 0;
}
.basket-section__eyebrow {
    display: block;
    font-family: var(--ws-font-body);
    font-size: .65rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ws-gold);
    margin-bottom: .4rem;
}
.basket-section__title {
    font-family: var(--ws-font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--ws-forest);
    margin: 0 0 1.25rem;
    line-height: 1.15;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.basket-section__subtitle {
    font-family: var(--ws-font-body);
    font-size: .95rem;
    font-weight: 300;
    color: var(--ws-ink-soft);
    margin: -.5rem 0 1.5rem;
    line-height: 1.7;
}

.basket-divider {
    max-width: 820px;
    margin: 2.5rem auto 0;
    border: none;
    border-top: 1px solid var(--ws-sand);
}

/* ---- Basket table ---- */
.basket-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--ws-font-body);
    font-size: .88rem;
}
.basket-table thead th {
    font-size: .65rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ws-muted);
    text-align: left;
    padding: .5rem .75rem .75rem;
    border-bottom: 1px solid var(--ws-sand);
}
.basket-table tbody tr {
    border-bottom: 1px solid var(--ws-sand);
    transition: background var(--ws-transition);
}
.basket-table tbody tr:last-child { border-bottom: none; }
.basket-table tbody tr:hover { background: var(--ws-forest-lt); }
.basket-table td {
    padding: .85rem .75rem;
    vertical-align: middle;
    color: var(--ws-ink);
}
.bt-title {
    font-family: var(--ws-font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ws-forest);
}
.bt-cat-pill {
    font-family: var(--ws-font-body);
    font-size: .6rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: var(--ws-forest);
    color: var(--ws-white);
    padding: 3px 8px;
    border-radius: 3px;
}
.bt-price {
    font-family: var(--ws-font-display);
    font-weight: 600;
    color: var(--ws-gold);
    white-space: nowrap;
}
.bt-qty {
    display: flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
}
.qty-val {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 500;
}
.qty-btn {
    background: var(--ws-white);
    border: 1px solid var(--ws-sand);
    border-radius: 3px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ws-font-body);
    font-size: .9rem;
    font-weight: 500;
    color: var(--ws-forest);
    cursor: pointer;
    transition: background var(--ws-transition), border-color var(--ws-transition);
}
.qty-btn:hover { background: var(--ws-forest-lt); border-color: var(--ws-forest); }

.remove-btn {
    background: none;
    border: none;
    color: var(--ws-muted);
    font-size: .75rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    transition: color var(--ws-transition), background var(--ws-transition);
}
.remove-btn:hover { color: #c0392b; background: #fdf0ee; }

/* ---- Total ---- */
.basket-total {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--ws-sand);
    font-family: var(--ws-font-body);
    color: var(--ws-muted);
    font-size: .85rem;
    font-weight: 300;
}
.basket-total__amount {
    font-family: var(--ws-font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--ws-gold);
    line-height: 1;
}

/* ============================================================
   ORDER FORM
   ============================================================ */
.order-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    max-width: 560px;
}
.order-form__row {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.order-form__row--split {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}
.order-form__row label {
    font-family: var(--ws-font-body);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ws-ink-soft);
}
.order-form__row label .required { color: var(--ws-gold); margin-left: 2px; }

.order-form__row input,
.order-form__row textarea {
    font-family: var(--ws-font-body);
    font-size: .9rem;
    font-weight: 300;
    color: var(--ws-ink);
    background: white !important;
    border: 1.5px solid var(--ws-sand);
    border-radius: var(--ws-radius);
    padding: .65rem .9rem;
    transition: border-color var(--ws-transition), box-shadow var(--ws-transition);
    width: 100%;
    box-sizing: border-box;
}
.order-form__row input::placeholder,
.order-form__row textarea::placeholder {
    color: var(--ws-muted);
    font-weight: 300;
}
.order-form__row input:focus,
.order-form__row textarea:focus {
    outline: none;
    border-color: var(--ws-gold);
    box-shadow: 0 0 0 3px rgba(184,151,90,.12);
}
.order-form__row textarea { resize: vertical; min-height: 110px; }

/* ============================================================
   ORDER FEEDBACK
   ============================================================ */
.order-feedback {
    font-family: var(--ws-font-body);
    font-size: .88rem;
    font-weight: 400;
    padding: .85rem 1rem;
    border-radius: var(--ws-radius);
    line-height: 1.5;
    max-width: 820px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Success — shown after order, outside basket-contents */
.order-feedback.success {
    background: var(--ws-forest-lt);
    color: var(--ws-forest);
    border: 1px solid rgba(45,74,62,.2);
    border-left: 4px solid var(--ws-forest);
    font-family: var(--ws-font-display);
    font-size: 1.15rem;
    font-weight: 400;
    font-style: italic;
    padding: 2rem 2.5rem;
    letter-spacing: .01em;
    line-height: 1.7;
    text-align: center;
    margin: 3rem auto;
    box-shadow: var(--ws-shadow);
}

/* Error — shown inline within the form area */
.order-feedback.error {
    background: #fdf0ee;
    color: #a33;
    border: 1px solid rgba(160,60,50,.2);
    max-width: 560px;
    margin: 0;
}

/* ---- Submit button ---- */
.order-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--ws-font-body);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: var(--ws-forest);
    color: var(--ws-white);
    border: none;
    border-radius: var(--ws-radius);
    padding: .9rem 1.75rem;
    cursor: pointer;
    align-self: flex-start;
    margin-top: .5rem;
    transition: background var(--ws-transition), transform .1s;
}
.order-submit-btn:hover   { background: var(--ws-forest-mid); }
.order-submit-btn:active  { transform: scale(0.98); }
.order-submit-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   NAV BASKET LINK
   ============================================================ */
.shop-basket-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--ws-font-body);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ws-forest);
    transition: color var(--ws-transition);
}
.shop-basket-link:hover { color: var(--ws-gold); }
.shop-basket-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--ws-gold);
    color: var(--ws-white);
    font-family: var(--ws-font-body);
    font-size: .65rem;
    font-weight: 600;
    line-height: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .basket-table thead { display: none; }
    .basket-table tbody tr { display: flex; flex-wrap: wrap; gap: .3rem; padding: .75rem 0; }
    .basket-table td { padding: .2rem 0; border: none; }
    .bt-title { width: 100%; font-size: .95rem; }
    .bt-cat, .bt-price { font-size: .8rem; }
    .order-submit-btn { width: 100%; justify-content: center; }
    .order-feedback.success { margin: 2rem 1rem; padding: 1.5rem; }
}
@media (max-width: 400px) {
    .shop-grid { grid-template-columns: 1fr; }
}