/* NeuroDisney Shop — Design System
   Matching shop.neurodisney.co Shopify theme
   Palette: cream bg, black text, colorful accents
   Fonts: Montserrat (body), Lato (headings)
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    --bg: #ffffff;
    --bg-card: #ffffff;
    --black: #000000;
    --text: #121212;
    --text-body: #121212;
    --text-muted: #999;
    --border: #e8e6dc;
    --accent: #47a1b3;
    --danger: #c44d4d;
    --success: #2e7d32;
    --radius-card: 1.2rem;
    --radius-btn: 40px;
    --max-width: 1280px;
    --pad-x: 28px;
    --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    background: var(--bg);
    color: var(--text-body);
    line-height: 1.6;
    letter-spacing: 0.4px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', sans-serif;
    font-weight: 400;
    color: var(--black);
    letter-spacing: 0.6px;
}

a { color: var(--black); text-decoration: none; }
a:hover { opacity: 0.7; }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

/* ═══ HEADER ═══ */

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 12px 0;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--pad-x);
    padding-right: var(--pad-x);
}

.nav-left {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-left a {
    font-size: 13px;
    font-weight: 400;
    color: var(--black);
    text-transform: lowercase;
}

.logo {
    display: flex;
    justify-content: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    list-style: none;
}

.nav-right a {
    color: var(--black);
    display: flex;
    align-items: center;
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-count {
    background: var(--black);
    color: white;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -6px;
    right: -8px;
}

.cart-count:empty, .cart-count[data-count="0"] { display: none; }

/* ═══ PRODUCT GRID ═══ */

.page-title {
    padding: 32px 0 24px;
}

.page-title h1 {
    font-size: 40px;
    font-weight: 400;
    color: var(--black);
}

.page-title p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding-bottom: 60px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    opacity: 1;
}

.product-card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f5f5f0;
}

.product-card-image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ddd;
}

.product-card-body {
    padding: 14px 4px 20px;
}

.product-card-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--black);
    margin-bottom: 4px;
}

.product-card-price {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-body);
}

.product-card-compare {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 13px;
    margin-left: 8px;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.sold-out { background: var(--danger); }
.product-badge.pre-order { background: #f0c040; color: var(--black); }
.product-badge.limited { background: #ff8c00; }

/* ═══ PRODUCT DETAIL ═══ */

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 48px 0 80px;
    align-items: start;
}

.product-gallery img {
    width: 100%;
    border-radius: var(--radius-card);
    background: #f5f5f0;
}

.product-info h1 {
    font-size: 28px;
    font-weight: 400;
    color: var(--black);
    margin-bottom: 8px;
}

.product-price-large {
    font-size: 20px;
    font-weight: 400;
    color: var(--black);
    letter-spacing: 1.4px;
    margin-bottom: 20px;
}

.product-price-large .compare {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 16px;
    margin-left: 12px;
}

.product-description {
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 28px;
}

.product-stock {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.product-stock.low { color: var(--danger); }

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-selector button {
    width: 36px;
    height: 36px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition);
    padding: 0;
}

.quantity-selector button:hover { border-color: var(--black); }

.quantity-selector input {
    width: 40px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--black);
    background: transparent;
    -moz-appearance: textfield;
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ═══ BUTTONS ═══ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-btn);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    letter-spacing: 1.1px;
}

.btn-primary {
    background: var(--black);
    color: white;
    border-color: var(--black);
}

.btn-primary:hover {
    background: #333;
    border-color: #333;
    color: white;
    opacity: 1;
}

.btn-primary:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    color: var(--black);
    border-color: var(--black);
}

.btn-outline:hover {
    background: var(--black);
    color: white;
    opacity: 1;
}

.btn-full { width: 100%; }

/* ═══ CART ═══ */

.cart-empty {
    text-align: center;
    padding: 80px 20px;
}

.cart-empty h2 { color: var(--black); margin-bottom: 12px; }
.cart-empty p { color: var(--text-muted); margin-bottom: 24px; }

.cart-items {
    margin-bottom: 32px;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    gap: 24px;
}

.cart-row-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.cart-row-details {
    min-width: 0;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #f5f5f0;
    flex-shrink: 0;
}

.cart-item-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--black);
    line-height: 1.4;
}

.cart-item-remove {
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 2px 0;
    text-decoration: underline;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-item-remove:hover { color: var(--danger); }

.cart-row-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.cart-row-total {
    font-weight: 600;
    font-size: 15px;
    min-width: 70px;
    text-align: right;
}

@media (max-width: 750px) {
    .cart-row { flex-wrap: wrap; gap: 12px; }
    .cart-row-right { width: 100%; justify-content: space-between; padding-left: 96px; }
    .cart-item-img { width: 64px; height: 64px; }
    .cart-row-right { padding-left: 80px; }
}

.cart-summary {
    max-width: 400px;
    margin-left: auto;
}

.cart-summary-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

/* ═══ CHECKOUT ═══ */

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 48px;
    padding: 32px 0 80px;
}

.checkout-section {
    margin-bottom: 32px;
}

.checkout-section h2 {
    font-size: 18px;
    font-weight: 400;
    color: var(--black);
    margin-bottom: 16px;
    font-family: 'Playfair Display', sans-serif;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-body);
    margin-bottom: 4px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--black);
}

.order-summary-card {
    background: var(--bg);
    border-radius: var(--radius-card);
    padding: 24px;
    border: 1px solid var(--border);
    position: sticky;
    top: 100px;
}

.order-summary-card h3 {
    font-size: 16px;
    font-weight: 400;
    color: var(--black);
    margin-bottom: 16px;
    font-family: 'Playfair Display', sans-serif;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.order-summary-item .item-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-summary-item .item-qty {
    background: var(--border);
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* Google Places Autocomplete */
#address-autocomplete-wrapper {
    margin-bottom: 12px;
}

#address-autocomplete-wrapper gmp-place-autocomplete {
    width: 100%;
}

input[type="radio"] {
    accent-color: var(--black);
    width: 16px;
    height: 16px;
}

#card-element {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
}

.payment-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 8px;
}

/* ═══ CONFIRMATION ═══ */

.confirmation {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.confirmation h1 {
    color: var(--black);
    margin-bottom: 12px;
}

.confirmation .order-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--black);
    background: var(--bg);
    padding: 12px 24px;
    border-radius: 8px;
    display: inline-block;
    margin: 16px 0 24px;
}

/* ═══ FOOTER ═══ */

.site-footer {
    background: #1f1300;
    color: rgba(255,255,255,0.7);
    padding: 40px var(--pad-x);
    text-align: center;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.footer-instagram {
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
}

.footer-instagram:hover { color: white; opacity: 1; }

.footer-disclaimer {
    font-size: 14px;
    color: #ffffff;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.footer-copyright {
    font-size: 14px;
    color: #ffffff;
    margin-top: 16px;
}

.footer-copyright a {
    color: #ffffff;
    text-decoration: none;
}

/* ═══ UTILITIES ═══ */

.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }

.loading {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-top-color: var(--black);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ RESPONSIVE ═══ */

@media (max-width: 990px) {
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .checkout-layout { grid-template-columns: 1fr; }
    .order-summary-card { position: static; }
}

@media (max-width: 750px) {
    :root { --pad-x: 16px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .page-title h1 { font-size: 28px; }
    .page-title { padding: 24px 0 16px; }
    .header-inner { grid-template-columns: auto 1fr auto; }
    .nav-left { gap: 16px; }
    .nav-left a { font-size: 12px; }
    .logo img { height: 40px; }
    .product-card-body { padding: 10px 2px 14px; }
    .product-card-name { font-size: 13px; }
    .product-card-price { font-size: 13px; }
    .cart-table th:nth-child(3),
    .cart-table td:nth-child(3) { display: none; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .nav-left { display: none; }
    .header-inner { grid-template-columns: 1fr auto; }
    .logo { justify-content: flex-start; }
}

/* ═══ STICKY FOOTER ═══ */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

/* ═══ PAYMENT ICONS ═══ */

.payment-icons {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

.payment-icons .list-payment {
    display: flex;
    gap: 6px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.payment-icons .list-payment__item { line-height: 0; }

.payment-icons svg { opacity: 0.7; }
