/* ==========================================================================
   1. ROOT VARIABLES & GLOBAL RESETS (PUBLIC STOREFRONT)
   ========================================================================== */
:root {
    --brand-primary: #f85606;
    --brand-hover: #e04b00;
    --brand-light: #fff5ee;
    --brand-border: #ffd8bd;
    --page-bg: #eff0f5;
    --card-bg: #ffffff;
    --text-main: #212121;
    --text-sub: #757575;
    --border-line: #e0e0e0;
    --border-light: #f1f3f6;
    --green: #15803d;
    --danger: #dc2626;
}

[hidden] {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body {
    background-color: var(--page-bg);
    color: var(--text-main);
    padding-top: 52px; /* Fixed space for 52px public topbar */
    min-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    line-height: 1.5;
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
    border: 0;
    background: none;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   2. PUBLIC TOPBAR (STANDALONE HEADER)
   ========================================================================== */
.public-topbar {
    height: 52px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-line);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.public-brand {
    display: flex;
    align-items: center;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: var(--brand-primary);
    white-space: nowrap;
}

.public-brand span {
    color: var(--green);
}

.public-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-become-seller {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    background: linear-gradient(135deg, #f85606 0%, #ff7224 100%);
    color: #ffffff;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(248, 86, 6, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.btn-become-seller:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(248, 86, 6, 0.35);
}

.btn-become-seller svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.top-btn-plus {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid #cbd5e1;
    color: var(--text-sub);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.18s ease;
}

.top-btn-plus:hover {
    background-color: var(--brand-light);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.top-btn-plus svg {
    width: 16px;
    height: 16px;
}

.top-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-line);
    background: var(--green);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-decoration: none;
}

.top-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   3. PRODUCT DETAIL & SWEET SLIDER (product-view.php)
   ========================================================================== */
.prod-page-container {
    max-width: 1140px;
    margin: 14px auto 40px;
    padding: 0 14px;
    box-sizing: border-box;
}

.product-master-card {
    background: var(--card-bg);
    border: 1px solid var(--border-line);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    margin-bottom: 16px;
}

.product-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 24px;
    padding: 20px;
}

.gallery-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.carousel-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fafafa;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    touch-action: pan-y;
    user-select: none;
    cursor: grab;
}

.carousel-viewport:active {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.carousel-track.is-dragging {
    transition: none !important;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.carousel-counter-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 3;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    z-index: 2;
    transition: background 0.2s, color 0.2s;
}

.gallery-nav-btn:hover {
    background: #fff;
    color: var(--brand-primary);
}

.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }

.thumbnail-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.thumbnail-strip::-webkit-scrollbar {
    display: none;
}

.thumb-btn {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    border: 1px solid var(--border-line);
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    padding: 0;
    transition: border-color 0.18s ease;
}

.thumb-btn.active {
    border: 2px solid var(--brand-primary);
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-box {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.seller-brand-line {
    font-size: 13px;
    color: #0284c7;
    font-weight: 500;
    margin-bottom: 4px;
}

.product-title-text {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
    margin: 0 0 8px;
}

.product-badge-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid var(--border-line);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-sub);
    font-weight: 500;
}

.meta-tag.cod-active {
    background: #e8f5e9;
    color: var(--green);
    border-color: #c8e6c9;
    font-weight: 600;
}

.meta-tag.advance-active {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
    font-weight: 600;
}

.price-panel {
    background: #fafafa;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.price-label-small {
    display: block;
    font-size: 11px;
    color: var(--text-sub);
    margin-bottom: 2px;
}

.price-display {
    font-size: 27px;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1.1;
}

.stock-status-line {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    color: var(--green);
}

.stock-status-line.out-of-stock {
    color: var(--danger);
}

.variant-group-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.variant-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.variant-label-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

.variant-label-title span {
    color: var(--text-sub);
    font-weight: 400;
}

.variant-options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.variant-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid var(--border-line);
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.variant-btn-pill:hover,
.variant-btn-pill.active {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.variant-btn-pill.active {
    background: var(--brand-light);
    font-weight: 700;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    display: inline-block;
}

.qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.qty-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
}

.qty-control-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-line);
    border-radius: 6px;
    height: 32px;
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    width: 32px;
    height: 100%;
    background: #f8fafc;
    color: #1e293b;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.qty-number {
    width: 42px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    border-left: 1px solid var(--border-line);
    border-right: 1px solid var(--border-line);
}

.action-button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-action-prod {
    height: 44px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-action-prod svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.btn-call {
    color: var(--brand-primary);
    background: var(--brand-light);
    border: 1px solid var(--brand-border);
}

.btn-call:hover {
    background: #ffe6d6;
}

.btn-buy {
    color: #fff;
    background: var(--brand-primary);
    box-shadow: 0 3px 10px rgba(248, 86, 6, 0.25);
}

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

.service-guarantees-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 12px;
    background: #fafafa;
    border: 1px solid var(--border-light);
    border-radius: 6px;
}

.service-point {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #374151;
    font-weight: 500;
}

.service-point svg {
    width: 16px;
    height: 16px;
    color: var(--brand-primary);
    flex-shrink: 0;
}

.product-tabs-section {
    border-top: 1px solid var(--border-line);
    background: var(--card-bg);
}

.detail-block {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.detail-block:last-child {
    border-bottom: 0;
}

.detail-block-title {
    margin: 0 0 8px;
    font-size: 14.5px;
    font-weight: 700;
    color: #1f2937;
}

.highlight-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.highlight-item {
    position: relative;
    padding-left: 14px;
    font-size: 13px;
    color: #4b5563;
}

.highlight-item::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 7px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand-primary);
}

.description-paragraph {
    color: #374151;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-line;
}

.related-shelf {
    background: var(--card-bg);
    border: 1px solid var(--border-line);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    margin-top: 16px;
}

.related-shelf-head {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.related-shelf-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.related-shelf-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.related-item-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.related-item-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.related-thumb-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fafafa;
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
}

.related-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s;
}

.related-item-card:hover .related-thumb-box img {
    transform: scale(1.04);
}

.related-card-content {
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    gap: 4px;
}

.related-card-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 32px;
}

.related-card-price {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--brand-primary);
}

/* ==========================================================================
   4. CHECKOUT PAGE (checkout.php - MATCHED TO YOUR HTML)
   ========================================================================== */
.checkout-wrapper {
    width: 100%;
    display: block;
}

.content-body {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.checkout-page-wrap {
    max-width: 1040px;
    margin: 16px auto 50px;
    padding: 0 14px;
    box-sizing: border-box;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) 340px;
    gap: 16px;
    align-items: start;
}

.checkout-main-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.checkout-card {
    background-color: #ffffff;
    border: 1px solid var(--border-line);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    padding: 16px 18px;
    box-sizing: border-box;
}

/* Selected Product Brief */
.checkout-product {
    display: flex;
    align-items: center;
    gap: 14px;
}

.checkout-product img,
.checkout-product .product-image {
    width: 78px;
    height: 78px;
    border-radius: 6px;
    border: 1px solid var(--border-line);
    object-fit: contain;
    background: #fff;
    flex-shrink: 0;
}

.checkout-product .image-empty {
    display: grid;
    place-items: center;
    font-size: 11px;
    color: var(--text-sub);
}

.checkout-product-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.checkout-product-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-product-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--text-sub);
}

.checkout-pill {
    display: inline-block;
    background: #f8fafc;
    border: 1px solid var(--border-line);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    color: #475569;
}

.checkout-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-primary);
}

/* Delivery Header & Voice Guide */
.delivery-header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.delivery-header-wrap .section-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.voice-toggle-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f8fafc;
    border: 1px solid var(--border-line);
    border-radius: 20px;
    padding: 4px 11px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.voice-toggle-badge:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.voice-toggle-badge input {
    accent-color: var(--brand-primary);
    cursor: pointer;
    margin: 0;
}

.voice-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.voice-toggle-label svg {
    color: var(--brand-primary);
    flex-shrink: 0;
}

/* Delivery Area Tiles */
.delivery-tiles-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 6px;
}

.delivery-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--border-line);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.delivery-tile:hover {
    border-color: #cbd5e1;
}

.delivery-tile:has(input:checked) {
    border-color: var(--brand-primary);
    background: var(--brand-light);
    box-shadow: 0 0 0 1px var(--brand-primary);
}

.delivery-tile input[type="radio"] {
    accent-color: var(--brand-primary);
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.delivery-tile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex-grow: 1;
}

.delivery-tile-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main);
}

.delivery-tile-sub {
    font-size: 11px;
    color: var(--text-sub);
}

.delivery-tile-badge {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand-primary);
    white-space: nowrap;
}

/* Form Inputs Grid (DIRECTLY MATCHED TO YOUR HTML) */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.field {
    min-width: 0;
}

.field.field-full {
    grid-column: 1 / -1;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    background: #fff;
    color: var(--text-main);
    font-size: 13.5px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.input,
.select {
    height: 40px;
    padding: 0 12px;
}

.textarea {
    min-height: 85px;
    padding: 10px 12px;
    resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(248, 86, 6, 0.12);
}

/* Order Summary Aside Card */
.checkout-aside-col {
    min-width: 0;
}

.checkout-aside-card {
    background-color: #ffffff;
    border: 1px solid var(--border-line);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    padding: 18px 20px;
    position: sticky;
    top: 66px;
}

.checkout-aside-card .aside-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    color: #475569;
}

.summary-row strong {
    color: var(--text-main);
}

.summary-row.total-row {
    margin-top: 4px;
    padding-top: 10px;
    border-bottom: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.summary-row.total-row strong {
    font-size: 20px;
    color: var(--brand-primary);
}

.summary-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-line);
    border-radius: 4px;
    overflow: hidden;
    height: 28px;
}

.summary-qty button {
    width: 28px;
    height: 100%;
    border: 0;
    background: #f8fafc;
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.summary-qty span {
    min-width: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
}

.summary-badge {
    display: inline-flex;
    align-items: center;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.summary-badge.advance {
    background: #e0f2fe;
    color: #0369a1;
}

/* Form Submit Button */
.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    background: var(--brand-primary);
    color: #ffffff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(248, 86, 6, 0.25);
    transition: background-color 0.15s ease, transform 0.15s ease;
    text-decoration: none;
}

.submit-btn:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
}

/* Success Card */
.order-success-box {
    max-width: 600px;
    margin: 20px auto;
    background: #ffffff;
    border: 1px solid var(--border-line);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.order-success-box .success-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #15803d;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
}

.order-success-token {
    display: inline-block;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 6px 14px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    margin: 8px 0;
    color: #1e293b;
}

.order-success-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
    margin: 20px auto 0;
}

.order-success-actions .link-secondary {
    background: #f8fafc;
    color: #334155;
    border: 1px solid var(--border-line);
}

.btn-replay-audio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.notice {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
}

.notice.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.notice ul {
    margin: 0;
    padding-left: 20px;
}

/* ==========================================================================
   5. ORDER TRACKING VIEW (tracking.php)
   ========================================================================== */
.tracking-page-container {
    max-width: 900px;
    margin: 16px auto 50px;
    padding: 0 14px;
    box-sizing: border-box;
}

.tracking-card {
    background: #ffffff;
    border: 1px solid var(--border-line);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.track-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 20px;
    background: #fafafa;
    border-bottom: 1px solid var(--border-light);
}

.track-header-left h1 {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.track-order-date {
    font-size: 12px;
    color: var(--text-sub);
    margin: 0;
}

.track-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.track-status-pill.status-pending { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }
.track-status-pill.status-confirmed { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.track-status-pill.status-processing { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.track-status-pill.status-shipped { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.track-status-pill.status-delivered { background: #e8f8f0; color: #27ae60; border: 1px solid #bbf7d0; }
.track-status-pill.status-cancelled { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.track-status-pill.status-returned { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }

/* 5-Step Stepper */
.tracker-stepper-wrap {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border-light);
    background: #ffffff;
}

.tracker-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}

.tracker-stepper::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 24px;
    right: 24px;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
}

.tracker-progress-bar {
    position: absolute;
    top: 15px;
    left: 24px;
    height: 3px;
    background: var(--brand-primary);
    z-index: 2;
    transition: width 0.3s ease;
}

.stepper-item {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.stepper-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.stepper-item.completed .stepper-circle {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: #ffffff;
}

.stepper-item.active .stepper-circle {
    border-color: var(--brand-primary);
    background: #ffffff;
    color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(248, 86, 6, 0.18);
}

.stepper-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
}

.stepper-item.active .stepper-label,
.stepper-item.completed .stepper-label {
    color: var(--text-main);
    font-weight: 700;
}

.abnormal-banner {
    margin: 16px 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.abnormal-banner.cancelled {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.abnormal-banner.returned {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
}

.track-body-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 18px;
}

.track-panel {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px;
}

.track-panel-title {
    margin: 0 0 12px;
    font-size: 14.5px;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

.track-product-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.track-product-row img,
.track-product-row .product-placeholder {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid var(--border-line);
    border-radius: 6px;
    background: #fafafa;
    flex-shrink: 0;
}

.track-product-row .product-placeholder {
    display: grid;
    place-items: center;
    font-size: 11px;
    color: var(--text-sub);
}

.track-product-info h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.track-product-info a {
    color: var(--text-main);
    transition: color 0.15s;
}

.track-product-info a:hover {
    color: var(--brand-primary);
}

.track-variant-pill {
    display: inline-block;
    background: #f8fafc;
    border: 1px solid var(--border-line);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    color: #475569;
    margin-bottom: 4px;
}

.track-product-qty {
    font-size: 12px;
    color: var(--text-sub);
    margin: 0;
}

.track-data-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.track-data-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    font-size: 12.5px;
}

.track-data-row span {
    color: var(--text-sub);
    flex-shrink: 0;
}

.track-data-row strong {
    text-align: right;
    color: var(--text-main);
    overflow-wrap: anywhere;
}

.track-data-row.total-row {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-line);
    font-size: 14.5px;
}

.track-data-row.total-row strong {
    color: var(--brand-primary);
    font-size: 17px;
}

.track-contact-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: var(--brand-light);
    border: 1px solid var(--brand-border);
    border-radius: 6px;
    margin-top: 14px;
}

.track-contact-text strong {
    display: block;
    font-size: 12.5px;
    color: var(--text-main);
}

.track-contact-text span {
    font-size: 11px;
    color: var(--text-sub);
}

.track-call-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--brand-primary);
    color: #ffffff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.15s ease;
}

.track-call-btn:hover {
    background: var(--brand-hover);
}

.track-empty-state {
    padding: 50px 20px;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.track-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand-primary);
    font-size: 24px;
    font-weight: 700;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
}

.track-search-form {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.track-search-form .input {
    flex-grow: 1;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.track-search-form .input:focus {
    border-color: var(--brand-primary);
}

.track-search-form .submit-btn {
    width: auto;
    white-space: nowrap;
    padding: 0 18px;
    height: 38px;
    background: var(--brand-primary);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

/* ==========================================================================
   6. CENTRALIZED RESPONSIVE MEDIA QUERIES (ALL AT BOTTOM IN ORDER)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Medium Tablets & Small Laptops (max-width: 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .product-main-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 14px;
    }

    .related-shelf-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* --------------------------------------------------------------------------
   Mobile & Small Tablets (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-aside-card {
        position: static;
    }

    .delivery-tiles-container {
        grid-template-columns: 1fr;
    }

    .track-body-grid {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .tracker-stepper::before,
    .tracker-progress-bar {
        top: 13px;
        left: 16px;
        right: 16px;
    }

    .stepper-circle {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .stepper-label {
        font-size: 10px;
    }
}

/* --------------------------------------------------------------------------
   Small Mobile Screens (max-width: 560px)
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
    .public-topbar {
        padding: 0 10px;
    }

    .btn-become-seller {
        padding: 6px 12px;
        font-size: 12px;
    }

    .prod-page-container {
        margin: 6px auto 26px;
        padding: 0 6px; /* Tight padding on mobile */
    }

    .product-master-card {
        border-radius: 6px;
    }

    .product-main-grid {
        padding: 8px;
        gap: 12px;
    }

    .product-title-text {
        font-size: 17px;
    }

    .price-display {
        font-size: 23px;
    }

    .action-button-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .service-guarantees-grid {
        grid-template-columns: 1fr;
    }

    .detail-block {
        padding: 12px 10px;
    }

    .related-shelf {
        padding: 12px 8px;
        border-radius: 6px;
    }

    .related-shelf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    /* Checkout on Mobile */
    .checkout-page-wrap {
        margin: 6px auto 26px;
        padding: 0 6px;
    }

    .checkout-card,
    .checkout-aside-card {
        padding: 12px;
        border-radius: 8px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .checkout-product {
        gap: 10px;
    }

    .checkout-product img,
    .checkout-product .product-image {
        width: 68px;
        height: 68px;
    }

    .checkout-product-title {
        font-size: 13.5px;
    }

    .order-success-box {
        padding: 20px 14px;
        border-radius: 8px;
    }

    /* Tracking on Mobile */
    .tracking-page-container {
        margin: 6px auto 26px;
        padding: 0 6px;
    }

    .tracking-card {
        border-radius: 8px;
    }

    .track-header {
        padding: 12px 14px;
    }

    .track-header-left h1 {
        font-size: 17px;
    }

    .tracker-stepper-wrap {
        padding: 16px 12px 14px;
    }
}