/* =====================================================
   Nathan Logistics Shop - Public CSS
   ===================================================== */

:root {
    --primary: #FF6900;
    --primary-dark: #E55A00;
    --primary-light: #FFF3E8;
    --secondary: #1F2937;
    --accent: #0EA5E9;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --text: #1F2937;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --bg: #FFFFFF;
    --bg-soft: #F9FAFB;
    --bg-gray: #F3F4F6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg-soft);
    line-height: 1.5;
    font-size: 15px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

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

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

/* ============== HEADER ============== */
.top-bar {
    background: var(--secondary);
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.top-bar a { color: #fff; }
.top-bar .top-links a { margin-left: 16px; }

.site-header {
    background: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 20px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    color: var(--secondary);
}
.logo-mark {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    display: flex;
    border: 2px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--primary); }
.search-bar input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 10px 18px;
    font-size: 14px;
    background: transparent;
}
.search-bar button {
    background: var(--primary);
    color: #fff;
    border: 0;
    padding: 0 22px;
    cursor: pointer;
    font-weight: 600;
}

.header-actions { display: flex; gap: 14px; align-items: center; }
.header-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: background 0.15s;
}
.header-action:hover { background: var(--bg-gray); color: var(--text); }
.cart-btn {
    background: var(--primary);
    color: #fff !important;
    position: relative;
}
.cart-btn:hover { background: var(--primary-dark); color: #fff !important; }
.cart-count {
    background: #fff;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
}

/* ============== NAV ============== */
.main-nav {
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.main-nav .container {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 0 20px;
}
.main-nav a {
    color: var(--text);
    padding: 14px 16px;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.15s;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ============== BANNER SLIDER ============== */
.hero-slider {
    position: relative;
    background: var(--bg-gray);
    margin: 20px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 1240px;
    margin: 20px auto;
}
.slides-wrap {
    position: relative;
    aspect-ratio: 1240 / 400;
    width: 100%;
    overflow: hidden;
}
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 60px;
}
.slide.active { opacity: 1; }
.slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.slide-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 500px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.slide-content h2 { font-size: 42px; margin-bottom: 12px; line-height: 1.1; }
.slide-content p { font-size: 17px; margin-bottom: 18px; opacity: 0.95; }
.slide-content .btn { background: var(--primary); }

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.slider-dots .dot {
    width: 10px; height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    border: 0;
    transition: all 0.2s;
}
.slider-dots .dot.active { background: #fff; width: 28px; }

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    cursor: pointer;
    z-index: 5;
    box-shadow: var(--shadow);
    font-size: 20px;
}
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }

/* ============== SECTION HEADERS ============== */
.section { padding: 30px 0; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary);
}
.section-link { font-weight: 600; font-size: 14px; }

/* ============== CATEGORY GRID ============== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.category-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px 14px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.2s;
    color: var(--text);
}
.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--primary);
}
.category-card .cat-img {
    width: 70px;
    height: 70px;
    margin: 0 auto 10px;
    background: var(--primary-light);
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.category-card .cat-img img { width: 100%; height: 100%; object-fit: cover; }
.category-card .cat-img.no-img { font-size: 28px; }
.category-card .cat-name { font-weight: 600; font-size: 14px; }

/* ============== PRODUCT GRID ============== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}
.product-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.product-card .product-img {
    aspect-ratio: 1;
    background: var(--bg-soft);
    overflow: hidden;
    position: relative;
}
.product-card .product-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s;
}
.product-card:hover .product-img img { transform: scale(1.05); }
.product-card .product-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-card .product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}
.product-card .product-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 4px;
}
.product-card .product-mrp {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 6px;
}
.product-card .product-discount {
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}
.product-card .product-actions {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    gap: 8px;
}
.product-card .btn-buy {
    flex: 1;
    background: var(--primary);
    color: #fff;
    border: 0;
    padding: 9px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
}
.product-card .btn-buy:hover { background: var(--primary-dark); color: #fff; }
.product-card .btn-cart {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 9px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.product-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 4px;
    z-index: 2;
}

/* ============== BUTTONS ============== */
.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 8px;
    border: 0;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
    text-align: center;
    line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-outline {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ============== PRODUCT DETAIL ============== */
.product-detail { background: #fff; border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); }
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.product-gallery .main-img {
    aspect-ratio: 1;
    background: var(--bg-soft);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
}
.product-gallery .main-img img { width: 100%; height: 100%; object-fit: contain; }
.thumbnails { display: flex; gap: 10px; overflow-x: auto; }
.thumbnails img {
    width: 70px; height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
}
.thumbnails img.active { border-color: var(--primary); }

.product-info-detail h1 { font-size: 26px; margin-bottom: 8px; }
.product-meta { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.price-block { margin: 18px 0; }
.price-block .price { font-size: 32px; font-weight: 800; color: var(--secondary); }
.price-block .mrp { font-size: 18px; color: var(--text-muted); text-decoration: line-through; margin-left: 12px; }
.price-block .discount { color: var(--success); font-weight: 700; margin-left: 8px; }
.price-block .gst-note { color: var(--text-muted); font-size: 13px; }

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.qty-control button {
    width: 38px;
    height: 38px;
    border: 0;
    background: var(--bg-soft);
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
}
.qty-control input {
    width: 50px;
    text-align: center;
    border: 0;
    height: 38px;
    font-weight: 600;
}

.action-row { display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap; }

.product-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.product-description h3 { font-size: 17px; margin-bottom: 10px; }
.product-description p { color: var(--text-muted); line-height: 1.7; }

.specs-list { list-style: none; padding: 0; }
.specs-list li {
    display: flex;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.specs-list li strong { width: 140px; color: var(--text); }

/* ============== CART & CHECKOUT ============== */
.page-title { font-size: 26px; font-weight: 700; margin: 24px 0 18px; }
.cart-table {
    width: 100%;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-collapse: collapse;
}
.cart-table th, .cart-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.cart-table th { background: var(--bg-soft); font-weight: 600; font-size: 13px; }
.cart-table .item-img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }
.cart-table .qty-control { transform: scale(0.85); }
.cart-table .remove-btn {
    background: transparent;
    border: 0;
    color: var(--danger);
    cursor: pointer;
    font-size: 18px;
}

.cart-summary {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 20px;
}
.cart-summary h3 { margin-bottom: 14px; }
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}
.summary-row.total {
    border-top: 2px solid var(--border);
    padding-top: 14px;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 700;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}
.form-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.form-card h3 { margin-bottom: 16px; font-size: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
.form-group label .req { color: var(--danger); }
.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
    outline: 0;
    background: #fff;
}
.form-control:focus { border-color: var(--primary); }
textarea.form-control { min-height: 90px; resize: vertical; }

/* ============== ORDER SUCCESS ============== */
.success-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 50px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    max-width: 600px;
    margin: 40px auto;
}
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    font-size: 40px;
}
.success-box h2 { font-size: 24px; margin-bottom: 8px; }
.tracking-id-display {
    background: var(--primary-light);
    border: 2px dashed var(--primary);
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    display: inline-block;
    margin: 20px 0;
}

/* ============== TRACKING TIMELINE ============== */
.tracking-form {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    max-width: 600px;
    margin: 30px auto;
}
.input-group {
    display: flex;
    gap: 0;
    margin-top: 14px;
}
.input-group input,
.input-group .form-control {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.tracking-form input {
    flex: 1;
    border-radius: 8px 0 0 8px;
    border-right: 0;
}
.tracking-form button {
    border-radius: 0 8px 8px 0;
    padding: 0 24px;
}

.timeline {
    position: relative;
    padding-left: 30px;
    margin-top: 20px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    padding-bottom: 24px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--border);
}
.timeline-item.done::before { background: var(--success); border-color: var(--success); }
.timeline-item.current::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255,105,0,0.2); }
.timeline-item .ti-status {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
}
.timeline-item .ti-time {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}
.timeline-item .ti-comment {
    margin-top: 4px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ============== FLASH MESSAGES ============== */
.flash {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
}
.flash-success { background: #D1FAE5; color: #065F46; border-left: 4px solid var(--success); }
.flash-error   { background: #FEE2E2; color: #991B1B; border-left: 4px solid var(--danger); }
.flash-info    { background: #DBEAFE; color: #1E40AF; border-left: 4px solid var(--accent); }
.flash-warning { background: #FEF3C7; color: #92400E; border-left: 4px solid var(--warning); }

/* ============== EMPTY STATES ============== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 60px; margin-bottom: 14px; opacity: 0.3; }
.empty-state h3 { font-size: 20px; color: var(--text); margin-bottom: 6px; }

/* ============== FOOTER ============== */
.site-footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.85);
    margin-top: 60px;
    padding: 50px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}
.footer-grid h4 { color: #fff; margin-bottom: 14px; font-size: 15px; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 18px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

/* ============== MOBILE ============== */
@media (max-width: 768px) {
    .site-header .container { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
    .search-bar { order: 3; width: 100%; }
    .header-actions { gap: 8px; }
    .header-action { padding: 6px 10px; font-size: 13px; }
    
    .slide { padding: 0 24px; }
    .slide-content h2 { font-size: 24px; }
    .slide-content p { font-size: 14px; }
    
    .product-detail-grid, .checkout-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card .product-info { padding: 10px; }
    .product-card .product-name { font-size: 13px; min-height: 36px; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    
    .cart-table thead { display: none; }
    .cart-table tbody td { display: block; border: 0; padding: 6px 16px; }
    .cart-table tbody tr { border-bottom: 1px solid var(--border); padding: 12px 0; display: block; }
    
    .top-bar { display: none; }
}
