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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #4A4038;
    background: #FBF8F4;
    line-height: 1.5;
}

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

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

/* Header */
.top-bar {
    background: #FDECD7;
    color: #8A5A28;
    text-align: center;
    font-size: 13px;
    padding: 7px 0;
    font-weight: 600;
}

.site-header { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 20px;
    flex-wrap: wrap;
}

.logo-link { display: inline-flex; align-items: center; }
.logo-img { height: 96px; width: auto; display: block; }

.category-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.category-nav a { font-weight: 600; font-size: 14px; text-transform: uppercase; color: #4A4038; }
.category-nav a:hover { color: #F0913D; }

.search-form { display: flex; flex: 1; min-width: 180px; max-width: 320px; }
.search-form input { flex: 1; padding: 8px 10px; border: 1px solid #EFE7DC; border-radius: 4px 0 0 4px; background: #FBF8F4; }
.search-form button { padding: 8px 14px; border: none; background: #F0913D; color: #fff; border-radius: 0 4px 4px 0; cursor: pointer; }

.nav-actions { display: flex; align-items: center; gap: 14px; font-size: 14px; flex-wrap: wrap; }
.cart-link { font-weight: 700; background: #F0913D; color: #fff; padding: 8px 14px; border-radius: 4px; }

/* Hero */
.hero {
    background: linear-gradient(135deg, #FFF9F1 0%, #FDECD7 100%);
    color: #4A4038;
    padding: 70px 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 8px;
}
.hero h1 { font-size: 42px; margin-bottom: 12px; color: #D97B24; }
.hero p { font-size: 18px; margin-bottom: 24px; color: #8C8175; }
.btn {
    display: inline-block;
    background: #F0913D;
    color: #fff;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 15px;
}
.btn:hover { background: #D97B24; }
.btn-outline { background: transparent; border: 2px solid #F0913D; color: #D97B24; }

/* Section titles */
.section-title { font-size: 24px; margin: 40px 0 20px; text-transform: uppercase; letter-spacing: 1px; color: #4A4038; }

/* Category tiles */
.category-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.category-tile {
    background: #fff; color: #4A4038; padding: 30px 20px; text-align: center;
    font-weight: 700; text-transform: uppercase; border-radius: 6px; font-size: 18px;
    border: 1px solid #EFE7DC; box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.category-tile:hover { background: #FDECD7; border-color: #F0913D; color: #D97B24; }

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: transform 0.15s ease;
    border: 1px solid #F3ECE1;
}
.product-card:hover { transform: translateY(-4px); }
.product-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.product-info { padding: 14px; }
.product-brand { font-size: 12px; text-transform: uppercase; color: #A69C8E; }
.product-name { font-weight: 600; margin: 4px 0; }
.product-price { color: #D97B24; font-weight: 700; }

/* Filters */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 10px;
}

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 30px 0; }
.product-detail img { width: 100%; border-radius: 8px; }
.product-detail h1 { font-size: 28px; margin-bottom: 6px; }
.product-detail .price { font-size: 24px; color: #D97B24; font-weight: 700; margin: 12px 0; }
.size-options { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.size-options label {
    border: 1px solid #EFE7DC; padding: 8px 14px; border-radius: 4px; cursor: pointer; font-size: 14px;
}
.size-options input { display: none; }
.size-options input:checked + span { font-weight: 700; }
.size-options label:has(input:checked) { border-color: #F0913D; background: #F0913D; color: #fff; }
.product-detail img#mainProductImage { width: 100%; border-radius: 8px; }

.product-gallery { display: flex; gap: 14px; }
.thumbnail-col { display: flex; flex-direction: column; gap: 10px; }
.main-image-wrap { flex: 1; min-width: 0; position: relative; }
.thumbnail {
    width: 64px; height: 64px; object-fit: cover; border-radius: 6px;
    border: 2px solid #EFE7DC; cursor: pointer; opacity: 0.8;
}
.thumbnail:hover { opacity: 1; }
.thumbnail.active { border-color: #F0913D; opacity: 1; }

.zoom-hint { text-align: center; font-size: 13px; color: #A69C8E; margin-top: 8px; }

.gallery-arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.gallery-arrow:hover { background: #fff; }
.arrow-left { left: 12px; }
.arrow-right { right: 12px; }

/* Details / Reviews tabs */
.product-tabs { margin: 40px 0; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid #F3ECE1; }
.tab-buttons { display: flex; border-bottom: 2px solid #F3ECE1; flex-wrap: wrap; }
.tab-btn {
    padding: 16px 24px; background: none; border: none; cursor: pointer;
    font-size: 15px; font-weight: 700; color: #A69C8E; border-bottom: 3px solid transparent;
}
.tab-btn.active { color: #4A4038; border-bottom-color: #F0913D; }
.tab-content { display: none; padding: 24px; }
.tab-content.active { display: block; }

.star-rating { color: #E3A013; letter-spacing: 1px; }

.review-summary { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.review-average { font-size: 40px; font-weight: 800; }

.review-form { max-width: 500px; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #F3ECE1; }

.review-item { padding: 16px 0; border-bottom: 1px solid #F3ECE1; }
.review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.review-date { color: #A69C8E; font-size: 13px; }

/* Rating summary near price + write a review link */
.rating-summary { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; font-size: 14px; flex-wrap: wrap; }
.rating-text { color: #8C8175; }
.write-review-link { color: #0d6efd; text-decoration: underline; font-size: 13px; }

/* Size guide */
.size-guide-link { font-size: 13px; text-decoration: underline; cursor: pointer; margin-left: 8px; color: #0d6efd; }
.size-guide-box {
    background: #fff; border-radius: 8px; padding: 24px;
    max-width: 420px; width: 90vw; position: relative;
}
.size-guide-note { font-size: 13px; color: #8C8175; background: #FBF8F4; padding: 10px; border-radius: 6px; }
.size-guide-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.size-guide-table th, .size-guide-table td { border: 1px solid #F3ECE1; padding: 8px; text-align: center; font-size: 14px; }
.size-guide-close {
    position: absolute; top: 10px; right: 14px; color: #4A4038;
    font-size: 26px; background: none; border: none; cursor: pointer; line-height: 1;
}

/* Detailed Size Chart modal */
.size-guide-large { max-width: 900px; width: 95vw; max-height: 85vh; overflow-y: auto; }
.size-chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.size-chart-header h3 { font-size: 22px; }
.unit-toggle { display: flex; border: 1px solid #EFE7DC; border-radius: 20px; overflow: hidden; }
.unit-btn { padding: 8px 18px; border: none; background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; }
.unit-btn.active { background: #F0913D; color: #fff; }

.size-chart-scroll { overflow-x: auto; border: 1px solid #F3ECE1; border-radius: 6px; margin-bottom: 24px; }
.size-chart-table { border-collapse: collapse; white-space: nowrap; }
.size-chart-table th, .size-chart-table td { padding: 10px 14px; text-align: center; font-size: 13px; border-bottom: 1px solid #F3ECE1; border-right: 1px solid #F8F3EC; }
.size-chart-table th { text-align: left; background: #FBF8F4; position: sticky; left: 0; font-weight: 700; }
.size-chart-table tr:nth-child(even) td { background: #FDFBF8; }

.how-to-measure-title { font-size: 16px; margin-bottom: 12px; }
.how-to-measure-list { padding-left: 20px; }
.how-to-measure-list li { margin-bottom: 12px; font-size: 14px; color: #6B6156; line-height: 1.5; }

/* Order tracking stepper */
.tracking-stepper { display: flex; justify-content: space-between; margin: 30px 0 20px; }
.tracking-step { flex: 1; text-align: center; position: relative; }
.tracking-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: #EFE7DC;
    z-index: 0;
}
.tracking-step.completed:not(:last-child)::after { background: #F0913D; }
.step-circle {
    width: 36px; height: 36px; border-radius: 50%; background: #EFE7DC; color: #fff;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 8px; position: relative; z-index: 1; font-weight: 700;
}
.tracking-step.completed .step-circle { background: #F0913D; }
.step-label { font-weight: 600; font-size: 13px; }
.step-date { font-size: 12px; color: #A69C8E; margin-top: 4px; }

.tracking-info-box { background: #fff; padding: 16px 20px; border-radius: 8px; margin-top: 10px; border: 1px solid #F3ECE1; }
.tracking-info-box p { margin-bottom: 4px; font-size: 14px; }

@media (max-width: 600px) {
    .tracking-stepper { flex-direction: column; gap: 20px; align-items: flex-start; }
    .tracking-step { display: flex; align-items: center; gap: 12px; text-align: left; }
    .tracking-step:not(:last-child)::after { display: none; }
    .step-circle { margin: 0; }
}

/* Real courier route header (origin -> status -> destination) */
.route-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 24px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #F3ECE1;
}
.route-city { font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: 0.5px; color: #4A4038; }
.route-status-wrap { flex: 1; text-align: center; margin: 0 24px; }
.route-status { font-size: 12px; color: #A69C8E; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.route-arrow-line { height: 2px; background: #EFE7DC; position: relative; margin: 0 4px; }
.route-arrow-line::after {
    content: '';
    position: absolute;
    right: -1px;
    top: -4px;
    border-left: 8px solid #EFE7DC;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

@media (max-width: 500px) {
    .route-header { flex-direction: column; gap: 10px; text-align: center; }
    .route-status-wrap { margin: 6px 0; width: 100%; }
    .timeline-item { grid-template-columns: 18px 50px 1fr; column-gap: 10px; }
    .timeline-item:not(:last-child)::after { left: 8px; }
    .courier-timeline-scroll { max-height: 360px; }
}

/* Courier checkpoint timeline (mirrors the courier's own tracking page) */
.courier-timeline-scroll {
    background: #fff;
    border-radius: 8px;
    padding: 20px 16px 20px 20px;
    max-height: 440px;
    overflow-y: auto;
    border: 1px solid #F3ECE1;
}
.courier-timeline-scroll::-webkit-scrollbar { width: 8px; }
.courier-timeline-scroll::-webkit-scrollbar-track { background: #FBF8F4; border-radius: 4px; }
.courier-timeline-scroll::-webkit-scrollbar-thumb { background: #EFE7DC; border-radius: 4px; }
.courier-timeline-scroll::-webkit-scrollbar-thumb:hover { background: #DDD0C0; }

.timeline-date-group { margin-bottom: 8px; }
.timeline-date-header {
    font-weight: 800; font-size: 12px; color: #4A4038;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin: 18px 0 12px; padding-bottom: 6px; border-bottom: 1px solid #F3ECE1;
}
.timeline-date-group:first-child .timeline-date-header { margin-top: 0; }

.timeline-item {
    display: grid;
    grid-template-columns: 24px 60px 1fr;
    column-gap: 14px;
    padding-bottom: 20px;
    position: relative;
}
.timeline-item:last-child { padding-bottom: 4px; }
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 22px;
    bottom: -6px;
    width: 2px;
    background: #F3ECE1;
}
.timeline-marker {
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 2px solid #EFE7DC;
    position: relative; z-index: 1; margin-top: 1px;
    grid-row: 1;
}
.timeline-item.current .timeline-marker { border-color: #F0913D; }
.timeline-item.current .timeline-marker::after {
    content: '\2713';
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: #F0913D; font-weight: 900;
}
.timeline-time { font-size: 12px; color: #A69C8E; padding-top: 1px; }
.timeline-item.current .timeline-time { color: #4A4038; font-weight: 700; }
.timeline-status { font-size: 14px; font-weight: 700; color: #8C8175; margin-bottom: 3px; }
.timeline-item.current .timeline-status { color: #4A4038; font-size: 15px; }
.timeline-city { font-size: 13px; color: #A69C8E; margin-bottom: 3px; font-weight: 600; }
.timeline-item.current .timeline-city { color: #6B6156; }
.timeline-message { font-size: 13px; color: #C2B8AB; line-height: 1.5; }
.timeline-item.current .timeline-message { color: #6B6156; font-weight: 600; }

/* Write a Review modal */
.review-modal-box {
    background: #fff; border-radius: 8px; padding: 24px;
    max-width: 480px; width: 92vw; max-height: 85vh; overflow-y: auto; position: relative;
}
.review-guidelines { background: #FBF8F4; padding: 14px; border-radius: 6px; margin: 14px 0; }
.review-guidelines h4 { margin-bottom: 8px; font-size: 14px; }
.review-guidelines ul { padding-left: 18px; font-size: 13px; color: #8C8175; }
.review-guidelines li { margin-bottom: 4px; }

.review-terms-box { max-width: 600px; }
.review-terms-text { font-size: 13px; color: #6B6156; line-height: 1.6; }
.review-terms-text p { margin-bottom: 10px; }
.review-terms-text ul { padding-left: 18px; margin: 8px 0 12px; }
.review-terms-text li { margin-bottom: 4px; }

/* Favorite / wishlist button */
.favorite-btn-wrap { position: absolute; top: 12px; right: 12px; z-index: 6; }
.favorite-btn {
    display: flex; align-items: center; gap: 6px;
    background: #fff; border: 1px solid #EFE7DC; border-radius: 20px;
    padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
    text-decoration: none; color: #4A4038; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.favorite-btn:hover { border-color: #F0913D; }
.favorite-btn.active { background: #F0913D; color: #fff; border-color: #F0913D; }

/* Zoom / closer-look modal */
.zoom-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.zoom-modal.active { display: flex; }
.zoom-box {
    position: relative;
    width: 80vw;
    height: 80vh;
    max-width: 900px;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    cursor: zoom-out;
}
.zoom-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 180%;
    max-width: none;
}
.zoom-close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .zoom-box { width: 92vw; height: 70vh; }
    .zoom-box img { width: 100%; top: 0 !important; left: 0 !important; }
}

/* Forms */
.form-box {
    max-width: 420px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border: 1px solid #F3ECE1;
}
.form-box h2 { margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px; border: 1px solid #EFE7DC; border-radius: 4px; font-size: 14px;
}
.form-box .btn { width: 100%; margin-top: 10px; }
.form-footer { margin-top: 14px; font-size: 14px; text-align: center; }

/* Cart */
.cart-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.cart-table th, .cart-table td { padding: 14px; border-bottom: 1px solid #F3ECE1; text-align: left; }
.cart-table img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.cart-summary { max-width: 360px; margin-left: auto; background: #fff; padding: 20px; border-radius: 8px; margin-top: 20px; border: 1px solid #F3ECE1; }
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; }
.qty-form { display: flex; gap: 6px; align-items: center; }
.qty-form input { width: 50px; padding: 4px; }

/* Flash messages */
.flash { padding: 12px 16px; border-radius: 6px; margin: 20px 0; font-weight: 600; }
.flash-success { background: #e6f7ec; color: #1a7a3c; border: 1px solid #b5e6c6; }
.flash-error { background: #fdecec; color: #a3261a; border: 1px solid #f4bcb6; }

/* Footer */
.site-footer { background: #FCEEE0; color: #8C8175; margin-top: 50px; padding: 40px 0 10px; border-top: 1px solid #F3ECE1; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.site-footer h4 { color: #D97B24; margin-bottom: 10px; }
.site-footer p { font-size: 14px; margin-bottom: 6px; }
.site-footer a:hover { color: #D97B24; text-decoration: underline; }
.copyright { text-align: center; font-size: 12px; padding-top: 20px; color: #C2B8AB; }

.newsletter-form { display: flex; margin-bottom: 14px; }
.newsletter-form input {
    flex: 1; padding: 8px 10px; border: 1px solid #EFE7DC; background: #fff; color: #4A4038;
    border-radius: 4px 0 0 4px; font-size: 13px;
}
.newsletter-form button {
    padding: 8px 14px; border: none; background: #F0913D; color: #fff;
    border-radius: 0 4px 4px 0; cursor: pointer; font-weight: 700; font-size: 13px;
}
.social-icons { display: flex; gap: 10px; }
.social-icons a {
    width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid #EFE7DC;
    display: flex; align-items: center; justify-content: center; color: #D97B24;
}
.social-icons a:hover { background: #F0913D; border-color: #F0913D; color: #fff; }

/* Floating chat button */
.chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #F0913D;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 900;
}
.chat-fab:hover { background: #D97B24; }
.whatsapp-fab { background: #25D366; }
.whatsapp-fab:hover { background: #1ebe57; }

/* Back to Top button */
.back-to-top-btn {
    position: fixed;
    bottom: 90px;
    right: 28px;
    width: 48px;
    height: 48px;
    background: #fff;
    color: #F0913D;
    border: 2px solid #F0913D;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top-btn:hover { background: #F0913D; color: #fff; }

@media (max-width: 480px) {
    .back-to-top-btn { width: 42px; height: 42px; bottom: 78px; right: 26px; font-size: 20px; }
}

/* Admin table */
.admin-table { width: 100%; border-collapse: collapse; background: #fff; }
.admin-table th, .admin-table td { padding: 10px; border-bottom: 1px solid #F3ECE1; text-align: left; font-size: 14px; }
.admin-table img { width: 44px; height: 44px; object-fit: cover; }

@media (max-width: 768px) {
    .product-detail { grid-template-columns: 1fr; }
    .product-gallery { flex-direction: column-reverse; }
    .thumbnail-col { flex-direction: row; overflow-x: auto; }
    .main-nav { flex-direction: column; align-items: stretch; }
    .logo-img { height: 72px; }
    .search-form { max-width: 100%; }
    .cart-table, .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
    .category-tiles { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .hero { padding: 50px 16px; }
    .hero h1 { font-size: 30px; }
    .size-chart-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}