/* ==========================================================================
   SHOP PAGE STYLES
   ========================================================================== */

.shop-notice {
    background: linear-gradient(120deg, var(--color-brand), var(--color-brand-light));
    color: #fff;
    text-align: center;
    padding: 1.1rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.shop-notice strong { font-weight: 700; }

/* ---- Category folders ---- */

.shop-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-top: var(--spacing-sm);
}

.category-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2.2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.category-card.active {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent-light);
}

.category-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(30, 144, 255, 0.1);
    color: var(--color-brand);
}

.category-icon svg { width: 32px; height: 32px; }

.category-card h3 { margin-bottom: 0.3rem; }

.category-price {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-accent);
    background: rgba(30, 144, 255, 0.08);
    padding: 0.25rem 0.9rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

/* ---- Item grid (shown after selecting a category) ---- */

.shop-items-wrap { display: none; margin-top: var(--spacing-md); }
.shop-items-wrap.active { display: block; }

.shop-items-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.back-to-categories {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.1rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.back-to-categories:hover { background: var(--color-border); }

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.item-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.item-thumb {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
}

.item-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.item-body h4 { font-family: var(--font-heading); font-size: 1.02rem; color: var(--color-text); margin: 0; }
.item-price { font-family: var(--font-heading); font-weight: 600; color: var(--color-brand); font-size: 1.05rem; }

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    overflow: hidden;
    width: fit-content;
}
.qty-control button {
    width: 32px; height: 32px;
    border: none;
    background: var(--color-bg);
    color: var(--color-brand);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}
.qty-control button:hover { background: var(--color-border); }
.qty-control input {
    width: 34px;
    text-align: center;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text);
    background: transparent;
    -moz-appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.add-to-cart-btn {
    margin-top: auto;
    background: var(--btn-bg);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.6rem 1rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.2s ease;
}
.add-to-cart-btn:hover { background: var(--btn-hover); }
.add-to-cart-btn.added { background: #16a34a; }

/* ---- Donate section ---- */

.donate-shop-section { background: var(--color-bg-alt); }

.donate-note {
    max-width: 640px;
    margin: 0 auto var(--spacing-sm);
    text-align: center;
    background: rgba(30,144,255,0.07);
    border: 1px dashed var(--color-accent-light);
    border-radius: var(--radius);
    padding: 1rem 1.4rem;
    font-size: 0.95rem;
}

.donate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}

.donate-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.donate-card .item-thumb {
    aspect-ratio: auto;
    height: 90px;
    border-radius: var(--radius);
    background: rgba(30,144,255,0.08);
    font-size: 2.2rem;
}

.donate-card h4 { font-family: var(--font-heading); color: var(--color-text); }
.donate-card .unit-label { font-size: 0.85rem; color: var(--color-text-light); }

.donate-btn { background: #f59e0b; }
.donate-btn:hover { background: #d97706; }
.donate-btn.added { background: #16a34a; }

/* ---- Expandable donate card details ---- */

.expandable-card { cursor: pointer; }

.card-toggle-hint {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-accent);
    user-select: none;
}
.card-toggle-hint .hint-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}
.expandable-card.expanded .card-toggle-hint .hint-arrow { transform: rotate(180deg); }

.kit-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.expandable-card.expanded .kit-details { max-height: 320px; }

.kit-details-list {
    list-style: none;
    margin: 0;
    padding: 0.7rem 0.9rem;
    background: rgba(30,144,255,0.06);
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.kit-details-list li { position: relative; padding-left: 1rem; }
.kit-details-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

/* ---- Cart drawer ---- */

.cart-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
    position: fixed;
    top: 0; right: 0;
    width: min(420px, 100%);
    height: 100%;
    background: var(--color-bg-alt);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.3rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}
.cart-drawer-header h3 { margin: 0; }
.cart-close-btn { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--color-text-light); }

.cart-drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }

.cart-section-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-light);
    margin: 1.2rem 0 0.7rem;
}
.cart-section-label:first-child { margin-top: 0; }

.cart-line-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--color-border);
}
.cart-line-thumb {
    width: 42px; height: 42px;
    border-radius: 8px;
    background: rgba(30,144,255,0.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-info .name { font-family: var(--font-heading); font-weight: 500; font-size: 0.92rem; color: var(--color-text); }
.cart-line-info .price { font-size: 0.82rem; color: var(--color-text-light); }
.cart-line-remove {
    background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 0.85rem;
    text-decoration: underline;
}
.cart-line-remove:hover { color: #f43f5e; }

.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--color-text-light); }
.cart-empty-icon { font-size: 2.6rem; margin-bottom: 0.8rem; }

.cart-drawer-footer {
    border-top: 1px solid var(--color-border);
    padding: 1.2rem 1.5rem 1.5rem;
}
.cart-total-row { display: flex; justify-content: space-between; font-family: var(--font-heading); font-weight: 600; margin-bottom: 0.3rem; }
.cart-total-row.grand { font-size: 1.15rem; color: var(--color-brand); padding-top: 0.5rem; border-top: 1px dashed var(--color-border); margin-top: 0.5rem; }

.checkout-btn {
    width: 100%;
    margin-top: 1rem;
    background: var(--btn-bg);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.85rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}
.checkout-btn:hover { background: var(--btn-hover); }
.checkout-note { text-align: center; font-size: 0.78rem; color: var(--color-text-light); margin-top: 0.6rem; }

/* ---- Responsive ---- */

@media (max-width: 900px) {
    .shop-categories { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .shop-categories { grid-template-columns: 1fr; }
    .shop-notice { font-size: 0.92rem; padding: 0.9rem 1.1rem; }
    .cart-drawer { width: 100%; }
}