/* Maestro Parents Store - Barnes & Noble Inspired */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2C3E2C;
    --accent: #5C7C5C;
    --white: #FFFFFF;
    --off-white: #F8F6F3;
    --cream: #F5F3EF;
    --text: #333333;
    --text-muted: #666666;
    --border: #E5E2DD;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.1);
}

body {
    font-family: 'Heebo', 'Assistant', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--off-white);
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Top promo bar - B&N style */
.promo-bar {
    background: var(--primary);
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
}

.promo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.promo-text {
    opacity: 0.95;
}

.promo-link {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    font-weight: 500;
}

.promo-link:hover {
    color: white;
    text-decoration: underline;
}

/* Header - clean white like B&N */
.store-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.store-logo {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-family: 'Assistant', 'Heebo', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.header-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.header-nav a:hover {
    color: var(--accent);
}

/* Cart toggle */
.cart-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text);
    position: relative;
    padding: 0.5rem;
}

.cart-toggle:hover {
    color: var(--accent);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart sidebar */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-overlay.active {
    display: block;
    opacity: 1;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 360px;
    max-width: 100%;
    height: 100%;
    background: var(--white);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.cart-sidebar.active {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.cart-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.cart-close:hover {
    color: var(--text);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: var(--cream);
    border-radius: 4px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-item-variant {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-item-remove:hover {
    color: #c00;
}

.cart-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border);
}

.cart-total {
    margin-bottom: 1rem;
}

.cart-total-row {
    font-size: 1.1rem;
    color: var(--primary);
}

.cart-item-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-checkout:hover {
    background: var(--accent);
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Checkout modal */
.checkout-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1098;
    opacity: 0;
    transition: opacity 0.3s;
}

.checkout-overlay.active {
    display: block;
    opacity: 1;
}

.checkout-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1099;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.checkout-modal.active {
    display: flex;
}

.checkout-modal-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
}

.checkout-modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.checkout-modal-close:hover {
    color: var(--text);
}

.checkout-modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.checkout-modal-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.checkout-form .form-group {
    margin-bottom: 1rem;
}

.checkout-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
}

.checkout-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.checkout-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.checkout-checkboxes {
    margin-top: 0.5rem;
}

.checkout-checkboxes .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}

.checkout-checkboxes .checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.checkout-checkboxes .checkbox-label a {
    color: var(--accent);
    text-decoration: underline;
}

.checkout-checkboxes .checkbox-label a:hover {
    color: var(--primary);
}

.checkout-policy-approvals {
    margin: 1rem 0;
}

.checkout-policy-approvals .policy-item {
    margin-bottom: 0.75rem;
}

.checkout-policy-approvals .policy-link {
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
}

.checkout-policy-approvals .policy-link:hover {
    color: var(--primary);
}

.checkout-policy-approvals .policy-completed {
    color: var(--primary);
    font-weight: 500;
}

/* Policy modal - scroll-to-read */
.policy-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.policy-modal-overlay.active {
    display: flex;
}

.policy-modal {
    background: var(--white);
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
}

.policy-modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 1;
}

.policy-modal-close:hover {
    color: var(--text);
}

.policy-modal-title {
    font-size: 1.35rem;
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.policy-modal-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem 1rem;
    min-height: 200px;
}

.policy-modal-content {
    font-size: 0.95rem;
    line-height: 1.7;
}

.policy-modal-content h2 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--primary);
}

.policy-modal-content h2:first-child {
    margin-top: 0;
}

.policy-modal-content p {
    margin-bottom: 0.75rem;
}

.policy-loading {
    color: var(--text-muted);
}

.policy-modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.policy-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.policy-checkbox-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.policy-checkbox-label input[type="checkbox"]:not(:disabled) {
    cursor: pointer;
}

.btn-policy-next {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-policy-next:hover:not(:disabled) {
    background: var(--accent);
}

.btn-policy-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkout-error {
    color: #c00;
    font-size: 0.9rem;
    margin: 0.75rem 0;
    min-height: 1.2em;
}

.btn-checkout-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

.btn-checkout-submit:hover:not(:disabled) {
    background: var(--accent);
}

.btn-checkout-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Hero banner - B&N style promotional */
.hero-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #3d523d 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.banner-content h1 {
    font-family: 'Assistant', 'Heebo', sans-serif;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.banner-content p {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 560px;
    margin: 0 auto;
}

/* Sections */
.section {
    padding: 3rem 0;
}

.section-heading {
    font-family: 'Assistant', 'Heebo', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-align: left;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Featured product - B&N bestseller style */
.featured-section {
    background: var(--white);
}

.product-featured {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-top: 1.5rem;
}

.product-image-wrap {
    position: relative;
    background: var(--cream);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: block;
    text-decoration: none;
    cursor: pointer;
}

a.product-image-wrap:hover {
    box-shadow: var(--shadow-hover);
}

.product-image-wrap img {
    width: 100%;
    display: block;
    aspect-ratio: 1;
    object-fit: contain;
    padding: 1rem;
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-details h3 {
    font-family: 'Assistant', 'Heebo', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.product-desc {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1.25rem 0;
}

.quantity-selector {
    margin: 1rem 0;
}

.quantity-selector label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.qty-minus,
.qty-plus {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--cream);
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-minus:hover,
.qty-plus:hover {
    background: var(--border);
}

.qty-input {
    width: 52px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type="number"] {
    -moz-appearance: textfield;
}

.product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-buy-now {
    background: var(--accent);
    color: white;
}

.btn-buy-now:hover {
    background: var(--primary);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-buy-now-sm {
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-buy-now-sm:hover {
    background: var(--primary);
}

.btn-details {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.btn-details:hover {
    background: var(--primary);
    color: white;
}

.btn-details-sm {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-details-sm:hover {
    background: var(--primary);
    color: white;
}

/* Product grid - B&N style product cards */
.products-section {
    background: var(--cream);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.product-card {
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
}

.product-card.refill {
    border: 1px solid var(--border);
}

/* All cards same size - ensure consistent height */
.product-card .card-body {
    min-height: 0;
}

.card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--cream);
    display: block;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}

a.card-image:hover {
    opacity: 0.95;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

/* Goal stickers card: same size as other cards */
#goal-stickers-card .card-image img {
    object-fit: contain;
}

.refill-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: white;
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    font-family: 'Assistant', 'Heebo', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    flex: 1;
}

.product-options {
    margin-bottom: 0.75rem;
}

.product-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--white);
}

.product-select:focus {
    outline: none;
    border-color: var(--accent);
}

.card-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.card-price-note {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.badge-premium {
    background: linear-gradient(135deg, #b8860b, #d4a017) !important;
}

/* Buttons - B&N style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-add {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
}

.btn-add:hover {
    background: var(--accent);
}

.btn-quick-add {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    width: 100%;
}

.btn-quick-add:hover {
    background: var(--primary);
    color: white;
}

/* Footer - B&N style */
.store-footer {
    background: var(--primary);
    color: white;
    padding: 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-copy {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Responsive - 4 products in one row on desktop/tablet */
@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-image-wrap img {
        max-width: 280px;
        margin: 0 auto;
    }
    
    .header-nav {
        display: none;
    }
    
    .promo-container {
        flex-direction: column;
    }
}
