/* Costa Gym Store — light e-commerce theme */
.store-page {
    --store-gold: #b8860b;
    --store-gold-light: #d4a84b;
    --store-brown: #3d2b1f;
    --store-bg: #f5f6f8;
    --store-card: #ffffff;
    --store-border: #e8eaed;
    --store-text: #1f2937;
    --store-muted: #6b7280;
    --store-success: #16a34a;
    --store-danger: #dc2626;
    background: var(--store-bg);
    color: var(--store-text);
    min-height: 60vh;
}

.store-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.store-hero {
    text-align: center;
    padding: 36px 20px 28px;
    margin-bottom: 24px;
}
.store-hero h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0 0 8px;
    color: var(--store-text);
}
.store-hero p {
    margin: 0;
    color: var(--store-muted);
    font-size: 1.05rem;
}

.store-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.store-sidebar {
    background: var(--store-card);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 20px;
    position: sticky;
    top: 100px;
}
.store-sidebar h3 {
    margin: 0 0 14px;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.store-filter-group {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--store-border);
}
.store-filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.store-filter-group label.chk {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}
.store-price-inputs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.store-price-inputs input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--store-border);
    border-radius: 8px;
}
.store-range {
    width: 100%;
    accent-color: var(--store-gold);
}
.store-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.store-switch {
    position: relative;
    width: 44px;
    height: 24px;
}
.store-switch input { opacity: 0; width: 0; height: 0; }
.store-switch span {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: 0.2s;
}
.store-switch span:before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}
.store-switch input:checked + span { background: var(--store-gold); }
.store-switch input:checked + span:before { transform: translateX(20px); }

.store-main-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    background: var(--store-card);
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.store-count {
    color: var(--store-muted);
    font-weight: 600;
}
.store-sort select {
    padding: 8px 12px;
    border: 1px solid var(--store-border);
    border-radius: 8px;
    font-family: inherit;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.store-card {
    background: var(--store-card);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.store-card-img {
    position: relative;
    aspect-ratio: 1;
    background: #f0f0f0;
    overflow: hidden;
}
.store-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.store-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.store-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.4;
    min-height: 2.8em;
}
.store-card-price {
    color: var(--store-gold);
    font-weight: 900;
    font-size: 1.15rem;
    margin-bottom: 8px;
}
.store-card-price .old {
    color: var(--store-muted);
    text-decoration: line-through;
    font-size: 0.9rem;
    font-weight: 600;
    margin-inline-start: 6px;
}
.store-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.store-badge.in { background: #dcfce7; color: var(--store-success); }
.store-badge.out { background: #fee2e2; color: var(--store-danger); }

.store-qty-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}
.store-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--store-border);
    border-radius: 8px;
    overflow: hidden;
}
.store-qty button {
    width: 34px;
    height: 34px;
    border: none;
    background: #f3f4f6;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
}
.store-qty input {
    width: 42px;
    text-align: center;
    border: none;
    padding: 6px 0;
    font-weight: 700;
}
.store-add-btn {
    flex: 1;
    background: linear-gradient(90deg, var(--store-gold-light), var(--store-brown));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.2s;
}
.store-add-btn:hover { opacity: 0.92; }
.store-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cart */
.store-cart-page .store-wrap { max-width: 1100px; }
.store-cart-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 0 24px;
}
.store-cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}
.store-cart-item {
    display: grid;
    grid-template-columns: 90px 1fr auto auto auto;
    gap: 16px;
    align-items: center;
    background: var(--store-card);
    padding: 16px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    margin-bottom: 14px;
}
.store-cart-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
}
.store-cart-item h4 { margin: 0 0 6px; font-size: 1rem; }
.store-cart-item .price { color: var(--store-gold); font-weight: 800; }
.store-cart-line-total { text-align: center; }
.store-cart-line-total small { display: block; color: var(--store-muted); }
.store-cart-line-total strong { color: var(--store-gold); font-size: 1.1rem; }
.store-remove-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #e5e7eb;
    cursor: pointer;
    font-size: 1rem;
}
.store-summary {
    background: var(--store-card);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
    position: sticky;
    top: 100px;
}
.store-summary h3 {
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.store-summary .pill {
    background: #111;
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
}
.store-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--store-muted);
}
.store-summary-row.total {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--store-gold);
    border-top: 1px solid var(--store-border);
    padding-top: 12px;
    margin-top: 8px;
}
.store-coupon-box {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}
.store-coupon-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--store-border);
    border-radius: 8px;
}
.store-coupon-box button {
    background: var(--store-gold);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
}
.store-checkout-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(90deg, var(--store-gold-light), var(--store-brown));
    color: #fff;
    text-decoration: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: 900;
    margin-top: 12px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}
.store-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--store-card);
    border-radius: 14px;
}
.store-empty a {
    color: var(--store-gold);
    font-weight: 700;
}

/* Checkout */
.store-checkout-card {
    background: var(--store-card);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    max-width: 800px;
    margin: 0 auto;
}
.store-checkout-card h1 {
    margin: 0 0 6px;
    font-size: 1.8rem;
}
.store-checkout-card .sub {
    color: var(--store-muted);
    margin-bottom: 24px;
}
.store-section-title {
    font-weight: 800;
    margin: 20px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.store-field {
    margin-bottom: 14px;
}
.store-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 0.95rem;
}
.store-field label .req { color: var(--store-danger); }
.store-field input,
.store-field select,
.store-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--store-border);
    border-radius: 10px;
    box-sizing: border-box;
    font-family: inherit;
}
.store-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.store-shipping-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    border: 2px solid var(--store-gold);
    border-radius: 10px;
    background: #fffbeb;
}
.store-order-summary-toggle {
    background: #f3f4f6;
    padding: 14px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
}
.store-confirm-box {
    border: 2px solid var(--store-success);
    border-radius: 12px;
    padding: 18px;
    margin-top: 20px;
    background: #f0fdf4;
}
.store-confirm-box .wa-note {
    color: var(--store-success);
    font-weight: 600;
    margin-bottom: 10px;
}
.store-confirm-box .cod {
    background: #dcfce7;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.store-alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-weight: 600;
}
.store-alert.error { background: #fee2e2; color: #991b1b; }
.store-alert.success { background: #dcfce7; color: #166534; }
.store-alert.warn { background: #fef3c7; color: #92400e; }
.store-terms label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.store-confirm-order-btn {
    width: 100%;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.store-confirm-order-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.store-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.store-toast.show { opacity: 1; }

.store-header-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    padding: 4px;
    font-size: 1.2rem;
    line-height: 1;
}
.store-header-cart i {
    font-size: 1.2rem;
}
.store-header-cart .count {
    position: absolute;
    top: -4px;
    inset-inline-end: -6px;
    background: var(--store-gold, #b8860b);
    color: #fff;
    font-size: 0.72rem;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

@media (max-width: 992px) {
    .store-layout { grid-template-columns: 1fr; }
    .store-sidebar { position: static; }
    .store-cart-layout { grid-template-columns: 1fr; }
    .store-cart-item { grid-template-columns: 70px 1fr; }
    .store-cart-item .store-qty,
    .store-cart-item .store-cart-line-total,
    .store-remove-btn { grid-column: 2; }
    .store-field-row { grid-template-columns: 1fr; }
}

/* Order tracking & invoice */
.store-track-hero { text-align:center; margin-bottom:24px; }
.store-track-hero h1 { margin:0 0 8px; font-size:1.8rem; }
.store-track-hero p { color:#6b7280; margin:0; }
.store-track-form .store-field { margin-bottom:14px; }
.store-invoice-card {
    background:#fff; border-radius:14px; box-shadow:0 4px 20px rgba(0,0,0,0.08);
    padding:24px; border:1px solid #e8eaed;
}
.store-invoice-head {
    display:flex; justify-content:space-between; align-items:flex-start; gap:16px;
    border-bottom:2px solid #f3f4f6; padding-bottom:16px; margin-bottom:16px;
}
.store-invoice-head h2 { margin:0; font-size:1.3rem; }
.store-invoice-code { margin:6px 0 0; color:#b8860b; font-weight:900; font-size:1.1rem; }
.store-invoice-status {
    padding:8px 14px; border-radius:20px; font-weight:bold; font-size:0.9rem; white-space:nowrap;
}
.store-invoice-status.st-pending { background:#fff3cd; color:#856404; }
.store-invoice-status.st-processing { background:#cce5ff; color:#004085; }
.store-invoice-status.st-out_for_delivery { background:#dbeafe; color:#1e40af; }
.store-invoice-status.st-completed { background:#d4edda; color:#155724; }
.store-invoice-status.st-cancelled { background:#f8d7da; color:#721c24; }
.store-track-result { margin-bottom:24px; }
.store-track-order-title { margin-bottom:24px; }
.store-track-back {
    display:inline-flex; align-items:center; gap:6px; color:#1d3557; text-decoration:none;
    font-weight:bold; margin-bottom:10px; font-size:0.95rem;
}
.store-track-order-title h2 {
    margin:0; font-size:1.5rem; color:#1d3557; display:flex; flex-wrap:wrap; gap:8px; align-items:center;
}
.store-track-order-title h2 span { color:#b8860b; font-weight:900; }
.store-track-stepper {
    display:flex; align-items:flex-start; justify-content:space-between; gap:0;
    background:#fff; border-radius:14px; padding:28px 20px 20px; border:1px solid #e8eaed;
    box-shadow:0 4px 20px rgba(0,0,0,0.06); margin-bottom:20px; overflow-x:auto;
}
.store-track-step {
    flex:1; min-width:110px; display:flex; flex-direction:column; align-items:center; text-align:center;
    position:relative; z-index:1;
}
.store-track-step-icon {
    width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center;
    font-weight:bold; font-size:1rem; margin-bottom:10px; background:#fff;
}
.store-track-step.done .store-track-step-icon {
    background:#1d3557; color:#fff; border:2px solid #1d3557;
}
.store-track-step.current .store-track-step-icon {
    border:2px solid #1d3557; color:#1d3557;
}
.store-track-step.upcoming .store-track-step-icon {
    border:2px solid #d1d5db; color:#9ca3af;
}
.store-track-step-label {
    font-size:0.88rem; line-height:1.4; color:#374151; font-weight:600; max-width:130px;
}
.store-track-step.upcoming .store-track-step-label { color:#9ca3af; }
.store-track-step-line {
    flex:0 0 40px; height:2px; background:#d1d5db; margin-top:20px; align-self:flex-start;
}
.store-track-step-line.done { background:#1d3557; }
.store-order-history-card {
    background:#fff; border-radius:14px; padding:20px 24px; border:1px solid #e8eaed;
    box-shadow:0 4px 20px rgba(0,0,0,0.06);
}
.store-order-history-card h3 {
    margin:0 0 16px; font-size:1.1rem; color:#1d3557; display:flex; align-items:center; gap:8px;
}
.store-order-history-list { display:flex; flex-direction:column; gap:12px; }
.store-order-history-item {
    padding:14px 16px; background:#f8fafc; border-radius:10px; border:1px solid #eef2f7;
}
.store-order-history-head {
    display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; align-items:center;
}
.store-order-history-status {
    padding:4px 10px; border-radius:14px; font-size:0.85rem; font-weight:bold;
}
.store-order-history-status.st-pending { background:#fff3cd; color:#856404; }
.store-order-history-status.st-processing { background:#cce5ff; color:#004085; }
.store-order-history-status.st-out_for_delivery { background:#dbeafe; color:#1e40af; }
.store-order-history-status.st-completed { background:#d4edda; color:#155724; }
.store-order-history-status.st-cancelled { background:#f8d7da; color:#721c24; }
.store-order-history-date { color:#6b7280; font-size:0.88rem; }
.store-order-history-msg { margin:10px 0 0; color:#374151; line-height:1.6; }
@media (max-width:768px) {
    .store-track-stepper { padding:20px 12px; }
    .store-track-step { min-width:88px; }
    .store-track-step-label { font-size:0.78rem; max-width:90px; }
    .store-track-step-line { flex-basis:16px; }
}
.store-invoice-meta { color:#4b5563; line-height:1.7; margin-bottom:16px; }
.store-invoice-table { width:100%; border-collapse:collapse; margin:12px 0; }
.store-invoice-table th, .store-invoice-table td { padding:12px 10px; border-bottom:1px solid #eee; text-align:right; }
.store-invoice-table th { background:#f9fafb; font-size:0.92rem; }
.store-invoice-totals { margin-top:16px; border-top:2px solid #f3f4f6; padding-top:12px; }
.store-invoice-totals > div {
    display:flex; justify-content:space-between; padding:6px 0; color:#6b7280;
}
.store-invoice-totals .discount { color:#16a34a; }
.store-invoice-totals .grand {
    font-size:1.2rem; font-weight:900; color:#b8860b; border-top:1px solid #eee;
    margin-top:8px; padding-top:12px;
}
