/* Global Styles */
:root {
    --primary: #FF3C00;
    --dark: #121212;
    --gray: #2a2a2a;
    --text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    background-color: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    background-color: rgba(30, 30, 30, 0.95);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    transition: color 0.3s;
    font-size: 1.1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-icon span {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--primary);
    color: white;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* Background Image Placeholder */
    background-image: url('hero.png');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.6) 100%);
}

.hero-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-text {
    max-width: 600px;
}

.badge {
    background-color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin: 20px 0;
}

.text-highlight {
    color: var(--primary);
}

.hero-text p {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 30px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-outline {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.btn-outline:hover {
    background: white;
    color: black;
}

/* Floating Tire Animation */
.hero-image {
    position: relative;
}

.floating-tire {
    width: 500px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
    animation: float 4s ease-in-out infinite;
}

.discount-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary);
    padding: 30px;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 0 30px var(--primary);
    animation: pulse 2s infinite;
}

.discount-badge span {
    display: block;
    font-size: 1rem;
}

.discount-badge strong {
    font-size: 3rem;
    color: var(--primary);
    line-height: 0.9;
}

/* Products Section */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--gray);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    border: 1px solid #333;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(255, 60, 0, 0.2);
    border-color: var(--primary);
}

.product-img {
    width: 200px;
    margin-bottom: 20px;
    transition: transform 0.5s;
}

.product-card:hover .product-img {
    transform: scale(1.1) rotate(5deg);
}

.product-info h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.product-info .price {
    display: block;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 15px;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.contact-card {
    background: var(--gray);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #333;
    transition: 0.3s;
}

.contact-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.contact-card h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.contact-card i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

/* Standard Modal Content */
.modal-content {
    background-color: #1e1e1e;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #444;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s;
}

/* NEW: Checkout Layout */
.checkout-modal-content {
    max-width: 1000px;
    /* Wider for 2 columns */
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.checkout-left,
.checkout-right {
    flex: 1;
}

.checkout-left {
    border-right: 1px solid #333;
    padding-right: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.checkout-right {
    padding-left: 10px;
    max-height: 70vh;
    overflow-y: auto;
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #252525;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #333;
}

.chk-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #555;
    color: var(--primary);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

/* Checkout Form Styles */
.checkout-form input,
.checkout-form select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background-color: #2a2a2a;
    border: 1px solid #444;
    color: white;
    border-radius: 8px;
    font-family: inherit;
}

.checkout-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.checkout-form label {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 10px;
    display: block;
}

/* NEW: Receipt Modal Styles */
.receipt-paper {
    background: #fff;
    color: #000;
    font-family: 'Courier New', Courier, monospace;
    padding: 40px;
    max-width: 400px;
    margin: 5% auto;
    border-radius: 5px;
    /* Slight round */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Serrated edge effect (zig-zag) at bottom of receipt */
.receipt-paper::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(135deg, transparent 33%, #fff 33%, #fff 66%, transparent 66%),
        linear-gradient(45deg, transparent 33%, #fff 33%, #fff 66%, transparent 66%);
    background-size: 20px 20px;
    background-position: top;
    background-repeat: repeat-x;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #000;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.receipt-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.receipt-header p {
    font-size: 0.9rem;
    color: #333;
}

.receipt-body table {
    width: 100%;
    font-size: 0.9rem;
}

.receipt-body th {
    text-align: left;
    border-bottom: 1px solid #000;
    color: #000;
    padding: 5px 0;
}

.receipt-body td {
    padding: 5px 0;
    border-bottom: 1px dotted #ccc;
    color: #000;
}

.receipt-total {
    margin-top: 20px;
    text-align: right;
    font-size: 1.2rem;
    font-weight: bold;
    border-top: 2px dashed #000;
    padding-top: 10px;
}

/* ============================================ */
/* MOBILE RESPONSIVE - Enhanced for Phone UX  */
/* ============================================ */

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    border-radius: 3px;
    transition: 0.3s;
}

/* Mobile Navigation Overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    font-size: 1.5rem;
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    transition: 0.3s;
}

.mobile-nav a:hover {
    background: var(--primary);
}

/* Tablet - 1024px */
@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-image {
        margin-top: 30px;
    }

    .floating-tire {
        width: 350px;
    }

    .hero-btns {
        justify-content: center;
    }
}

/* Phone - 768px */
@media (max-width: 768px) {

    /* Show Hamburger, Hide Nav Links */
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .nav-links.mobile-show {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(30, 30, 30, 0.98);
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid var(--primary);
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links.mobile-show a {
        padding: 12px 20px;
        background: #2a2a2a;
        border-radius: 10px;
        text-align: center;
    }

    /* Logo smaller on mobile */
    .logo {
        font-size: 1.4rem;
    }

    /* Hero Section */
    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
        padding-bottom: 50px;
    }

    .hero-text {
        max-width: 100%;
        padding: 0 10px;
    }

    .hero-text h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px;
    }

    .hero-btns .btn {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
    }

    .floating-tire {
        width: 250px;
        margin-top: 30px;
    }

    /* Products Section */
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    /* Advanced Search - Stack on mobile */
    .advanced-search-container {
        padding: 20px 15px;
    }

    .search-box-large input {
        font-size: 1rem;
        padding: 12px 45px 12px 15px;
    }

    .advanced-filters {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .filter-select {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .filter-reset-btn {
        grid-column: 1 / -1;
    }

    /* Product Cards - Better for touch */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-card {
        padding: 15px 10px;
    }

    .product-card:hover {
        transform: none;
        /* Disable hover lift on mobile */
    }

    .product-img {
        width: 100%;
        max-width: 120px;
        margin-bottom: 10px;
    }

    .product-info h3 {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .product-info .price {
        font-size: 1.2rem;
    }

    .size-selector {
        width: 100%;
        padding: 10px;
        font-size: 0.85rem;
        border-radius: 8px;
        background: #1e1e1e;
        border: 1px solid #444;
        color: white;
    }

    .product-card .btn {
        width: 100%;
        padding: 12px 10px;
        font-size: 0.9rem;
    }

    /* Contact Cards */
    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 20px;
    }

    /* Modal - Full width on mobile */
    .modal-content {
        width: 95%;
        margin: 3% auto;
        padding: 20px 15px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .checkout-modal-content {
        flex-direction: column;
        padding: 15px;
    }

    .checkout-left {
        border-right: none;
        border-bottom: 1px solid #333;
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 20px;
        max-height: none;
    }

    .checkout-right {
        padding-left: 0;
    }

    /* Bigger touch targets */
    .btn {
        min-height: 48px;
        font-size: 1rem;
    }

    /* Cart Icon positioning */
    .cart-icon {
        font-size: 1.4rem;
    }

    /* Toast - wider on mobile */
    #toast {
        min-width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ============================================ */
/* PREMIUM MOBILE UI - App-like Experience     */
/* ============================================ */

/* Small phones - 480px - Premium Redesign */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    /* Premium Navigation */
    nav {
        padding: 12px 0;
        background: linear-gradient(180deg, rgba(18, 18, 18, 0.98) 0%, rgba(18, 18, 18, 0.95) 100%);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .logo {
        font-size: 1.3rem;
    }

    /* Glassmorphism Hamburger */
    .hamburger {
        background: rgba(255, 60, 0, 0.1);
        border-radius: 8px;
        padding: 8px;
        border: 1px solid rgba(255, 60, 0, 0.3);
    }

    .hamburger span {
        background: var(--primary);
    }

    /* Premium Mobile Menu */
    .nav-links.mobile-show {
        background: linear-gradient(180deg, rgba(30, 30, 30, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
        backdrop-filter: blur(20px);
        padding: 25px 20px;
        gap: 12px;
        border-bottom: 2px solid var(--primary);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    }

    .nav-links.mobile-show a {
        padding: 16px 20px;
        background: linear-gradient(145deg, #252525, #1a1a1a);
        border: 1px solid #333;
        border-radius: 12px;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        transition: all 0.3s ease;
    }

    .nav-links.mobile-show a:active {
        transform: scale(0.98);
        background: var(--primary);
    }

    /* Hero - Compact & Impactful */
    .hero {
        min-height: 85vh;
        padding-top: 80px;
        padding-bottom: 30px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
        background: linear-gradient(135deg, #fff 0%, #ccc 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .hero-text p {
        font-size: 0.95rem;
        line-height: 1.6;
        color: #aaa;
    }

    .badge {
        background: linear-gradient(135deg, var(--primary) 0%, #ff6b35 100%);
        font-size: 0.7rem;
        padding: 6px 14px;
        box-shadow: 0 4px 15px rgba(255, 60, 0, 0.4);
    }

    .hero-btns {
        gap: 12px;
    }

    .hero-btns .btn {
        padding: 16px 24px;
        font-size: 1rem;
        border-radius: 14px;
        font-weight: 600;
    }

    .btn-primary {
        background: linear-gradient(135deg, var(--primary) 0%, #ff6b35 100%);
        box-shadow: 0 6px 20px rgba(255, 60, 0, 0.4);
    }

    .btn-primary:active {
        transform: scale(0.98);
        box-shadow: 0 2px 10px rgba(255, 60, 0, 0.4);
    }

    .floating-tire {
        width: 200px;
        margin-top: 20px;
    }

    /* Premium Search Container */
    .advanced-search-container {
        padding: 20px 15px;
        border-radius: 16px;
        background: linear-gradient(145deg, #1e1e1e, #252525);
        border: 1px solid rgba(255, 60, 0, 0.2);
    }

    .search-box-large input {
        padding: 14px 50px 14px 18px;
        border-radius: 14px;
        font-size: 0.95rem;
        background: #151515;
        border: 1px solid #333;
    }

    .search-box-large input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(255, 60, 0, 0.1);
    }

    .advanced-filters {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .filter-select {
        padding: 14px 18px;
        border-radius: 12px;
        font-size: 0.95rem;
        background: linear-gradient(145deg, #252525, #1e1e1e);
        border: 1px solid #3a3a3a;
    }

    .filter-reset-btn {
        padding: 14px;
        border-radius: 12px;
        background: rgba(255, 60, 0, 0.1);
        border: 1px dashed var(--primary);
        color: var(--primary);
    }

    /* Premium Product Cards */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
        position: relative;
    }

    .section-title::after {
        content: '';
        display: block;
        width: 50px;
        height: 3px;
        background: linear-gradient(90deg, var(--primary), transparent);
        margin: 10px auto 0;
        border-radius: 3px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .product-card {
        display: flex;
        flex-direction: row;
        text-align: left;
        padding: 16px;
        gap: 16px;
        background: linear-gradient(145deg, #2a2a2a, #222);
        border: 1px solid #3a3a3a;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        transition: all 0.2s ease;
    }

    .product-card:active {
        transform: scale(0.99);
        border-color: var(--primary);
        box-shadow: 0 0 20px rgba(255, 60, 0, 0.2);
    }

    .product-card .product-img {
        width: 90px;
        height: 90px;
        object-fit: contain;
        flex-shrink: 0;
        background: linear-gradient(135deg, #333 0%, #222 100%);
        border-radius: 12px;
        padding: 8px;
    }

    .product-card .product-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .product-card .product-info h3 {
        font-size: 0.95rem;
        font-weight: 600;
        color: #fff;
        line-height: 1.3;
    }

    .product-card .product-info .price {
        font-size: 1.2rem;
        font-weight: 700;
        background: linear-gradient(135deg, var(--primary), #ff6b35);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    /* Premium Size Selector */
    .product-card .size-selector,
    .size-selector {
        padding: 12px 14px;
        font-size: 0.9rem;
        border-radius: 10px;
        background: linear-gradient(145deg, #1a1a1a, #222);
        border: 1px solid #444;
        color: #fff;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff3c00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 16px;
    }

    /* Premium Add to Cart Button */
    .product-card .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 10px;
        background: linear-gradient(135deg, var(--primary), #ff6b35);
        box-shadow: 0 4px 15px rgba(255, 60, 0, 0.3);
        transition: all 0.2s ease;
    }

    .product-card .btn:active {
        transform: scale(0.97);
    }

    .product-card .btn.btn-disabled {
        background: linear-gradient(135deg, #444, #333);
        box-shadow: none;
    }

    /* Premium Contact Cards */
    .contact-card {
        padding: 24px 20px;
        border-radius: 16px;
        background: linear-gradient(145deg, #2a2a2a, #222);
        border: 1px solid #3a3a3a;
    }

    .contact-card h3 {
        font-size: 1.1rem;
    }

    .contact-card i {
        font-size: 1.8rem;
        background: linear-gradient(135deg, var(--primary), #ff6b35);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    /* Premium Modal */
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        padding: 20px 16px;
        background: linear-gradient(180deg, #1a1a1a, #121212);
    }

    .checkout-modal-content {
        padding: 20px 16px;
    }

    .chk-header {
        font-size: 1.2rem;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #333;
    }

    .chk-item-row {
        background: linear-gradient(145deg, #252525, #1e1e1e);
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 10px;
        border: 1px solid #333;
    }

    .chk-summary-footer {
        background: linear-gradient(135deg, var(--primary), #ff6b35);
        padding: 16px 20px;
        border-radius: 12px;
        margin-top: 15px;
    }

    .chk-total-price {
        font-size: 1.4rem;
        font-weight: 700;
    }

    /* Premium Form Inputs */
    .checkout-form input,
    .checkout-form select {
        padding: 14px 16px;
        border-radius: 12px;
        font-size: 1rem;
        background: #1a1a1a;
        border: 1px solid #3a3a3a;
    }

    .checkout-form input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(255, 60, 0, 0.1);
    }

    /* Premium Payment Options */
    .payment-radio {
        padding: 16px;
        border-radius: 12px;
        background: linear-gradient(145deg, #252525, #1e1e1e);
        border: 1px solid #333;
        margin-bottom: 8px;
    }

    .payment-info-box {
        padding: 20px;
        border-radius: 12px;
        background: linear-gradient(145deg, #1e1e1e, #252525);
        border: 1px solid rgba(255, 60, 0, 0.3);
    }

    /* Premium Submit Button */
    #btnConfirmOrder {
        padding: 16px;
        font-size: 1.1rem;
        font-weight: 600;
        border-radius: 14px;
        background: linear-gradient(135deg, var(--primary), #ff6b35);
        box-shadow: 0 6px 20px rgba(255, 60, 0, 0.4);
    }

    #btnConfirmOrder:disabled {
        background: linear-gradient(135deg, #444, #333);
        box-shadow: none;
    }

    /* Premium Toast */
    #toast {
        border-radius: 14px;
        padding: 18px 24px;
        background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
        border: 1px solid var(--primary);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        font-weight: 500;
    }

    /* History Modal Premium */
    .history-modal-content {
        padding: 20px 16px;
        background: linear-gradient(180deg, #1a1a1a, #121212);
    }

    .history-header {
        text-align: center;
        padding-bottom: 20px;
        border-bottom: 1px solid #333;
    }

    .history-icon {
        font-size: 3rem;
        background: linear-gradient(135deg, var(--primary), #ff6b35);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 10px;
    }

    /* Premium Close Button */
    .close {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        font-size: 24px;
    }

    .close:active {
        background: var(--primary);
    }
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 60, 0, 0.7);
    }

    70% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 0 20px rgba(255, 60, 0, 0);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 60, 0, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Toast */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    border: 1px solid var(--primary);
}

#toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

.search-box {
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.search-box input {
    padding: 10px 40px 10px 15px;
    border-radius: 25px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: white;
    width: 300px;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.search-box button:hover {
    color: var(--primary);
}

/* Advanced Search Styles */
.advanced-search-container {
    background: linear-gradient(145deg, #1e1e1e, #252525);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
}

.advanced-search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), #ff7b00);
}

.search-header {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.search-box-large {
    flex: 1;
    position: relative;
}

.search-box-large input {
    width: 100%;
    padding: 15px 50px 15px 25px;
    background: #151515;
    border: 1px solid #444;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.search-box-large input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 60, 0, 0.2);
    outline: none;
}

.search-box-large button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box-large button:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 10px var(--primary);
}

.advanced-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.filter-group {
    position: relative;
}

.filter-select {
    width: 100%;
    padding: 12px 20px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
    color: #eee;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--primary);
    background-color: #333;
}

.filter-reset-btn {
    grid-column: 1 / -1;
    /* Span full width on small screens, adjust in media query if needed */
    background: transparent;
    color: #888;
    border: 1px dashed #555;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.filter-reset-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(255, 60, 0, 0.05);
}

@media (min-width: 768px) {
    .filter-reset-btn {
        grid-column: auto;
        /* Default behavior in grid */
        width: auto;
        margin-top: 0;
        background: #2a2a2a;
        border: 1px solid #444;
    }

    .filter-reset-btn:hover {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }
}

/* Size Selector Styles */
.size-selector {
    width: 100%;
    padding: 10px;
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.size-selector:hover {
    border-color: #777;
    background-color: #3a3a3a;
}

.size-selector:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 60, 0, 0.2);
}

.size-selector option {
    background: #222;
    color: white;
    padding: 10px;
}

.btn-disabled {
    background-color: #444 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    border: 1px solid #333;
}

/* Checkout Advanced Styles */
.chk-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    font-size: 1.2rem;
    color: var(--primary);
}

.chk-items-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 5px;
}

.chk-items-container::-webkit-scrollbar {
    width: 6px;
}

.chk-items-container::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.chk-item-row {
    background: #252525;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #333;
}

.chk-item-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: white;
}

.chk-item-info p {
    color: #aaa;
    font-size: 0.85rem;
    margin: 0;
}

.chk-summary-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 1.2rem;
    font-weight: bold;
}

.chk-total-price {
    color: var(--primary);
    font-size: 1.5rem;
}

/* Payment Options */
.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.payment-radio {
    cursor: pointer;
}

.payment-radio input {
    display: none;
}

.payment-radio span {
    display: block;
    padding: 15px;
    background: #2a2a2a;
    border: 2px solid #444;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
}

.payment-radio input:checked+span {
    border-color: var(--primary);
    background: rgba(255, 60, 0, 0.1);
    color: var(--primary);
    font-weight: bold;
}

.payment-info-box {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #444;
    animation: fadeIn 0.3s;
}

.payment-qr {
    width: 150px;
    border-radius: 10px;
    border: 4px solid white;
    margin-bottom: 15px;
}

.payment-details p {
    margin: 5px 0;
}

.form-group-sm {
    margin-bottom: 15px;
}

.form-group-sm label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-size: 0.9rem;
}

.form-group-sm input {
    width: 100%;
    padding: 10px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    color: white;
}

/* =============================================
   PROFESSIONAL RECEIPT STYLES
   ============================================= */

.receipt-professional {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    max-width: 520px;
    margin: 30px auto;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    color: #1a1a1a;
    font-family: 'Kanit', sans-serif;
}

/* Receipt Header */
.receipt-pro-header {
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b35 100%);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.receipt-logo {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.receipt-company h1 {
    color: white;
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.receipt-tagline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    margin: 0;
}

.receipt-type-badge span {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Company Info */
.receipt-company-info {
    background: #f8f9fa;
    padding: 15px 30px;
    border-bottom: 1px dashed #ddd;
}

.receipt-company-info .info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-size: 0.85rem;
    margin: 5px 0;
}

.receipt-company-info .info-item i {
    color: var(--primary);
    width: 18px;
}

/* Order Info Grid */
.receipt-order-info {
    padding: 20px 30px;
    border-bottom: 2px dashed #ddd;
}

.order-info-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.order-info-row:last-child {
    margin-bottom: 0;
}

.order-info-item {
    flex: 1;
}

.order-info-item.full-width {
    flex: 1 1 100%;
}

.order-info-item label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.order-info-item span {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.order-number {
    color: var(--primary) !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

.payment-badge {
    display: inline-block !important;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white !important;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem !important;
}

/* Items Table */
.receipt-items-section {
    padding: 20px 30px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
}

.receipt-table th {
    background: #f1f3f4;
    color: #333;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #ddd;
}

.receipt-table th.col-no {
    width: 40px;
    text-align: center;
}

.receipt-table th.col-qty {
    width: 60px;
    text-align: center;
}

.receipt-table th.col-price {
    width: 100px;
    text-align: right;
}

.receipt-table th.col-total {
    width: 100px;
    text-align: right;
}

.receipt-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #333;
}

.receipt-table td:first-child {
    text-align: center;
    color: #888;
}

.receipt-table td:nth-child(3) {
    text-align: center;
}

.receipt-table td:nth-child(4) {
    text-align: right;
    color: #666;
}

.receipt-table td:nth-child(5) {
    text-align: right;
    font-weight: 600;
    color: var(--primary);
}

.receipt-table tbody tr:hover {
    background: #fafafa;
}

.item-name-cell {
    display: flex;
    flex-direction: column;
}

.item-brand {
    font-weight: 600;
    color: #333;
}

.item-size {
    font-size: 0.8rem;
    color: #888;
}

/* Summary Section */
.receipt-summary {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 2px dashed #ddd;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.summary-row.subtotal {
    color: #666;
    font-size: 0.95rem;
}

.summary-row.total {
    border-top: 2px solid #333;
    padding-top: 15px;
    margin-top: 10px;
    font-size: 1.3rem;
    font-weight: 700;
}

.summary-row.total span:last-child {
    color: var(--primary);
}

/* Footer */
.receipt-pro-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 25px 30px;
    text-align: center;
}

.thank-you-message {
    margin-bottom: 15px;
}

.thank-you-message i {
    color: #e74c3c;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.thank-you-message p {
    color: white;
    font-size: 1.1rem;
    margin: 8px 0 5px;
    font-weight: 500;
}

.thank-you-message span {
    color: #888;
    font-size: 0.85rem;
}

.receipt-note {
    border-top: 1px solid #444;
    padding-top: 15px;
    margin-top: 15px;
}

.receipt-note p {
    color: #777;
    font-size: 0.75rem;
    margin: 3px 0;
}

/* Watermark */
.receipt-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
    font-size: 6rem;
    font-weight: 900;
    color: rgba(76, 175, 80, 0.08);
    text-transform: uppercase;
    letter-spacing: 10px;
    pointer-events: none;
    z-index: 0;
}

/* Receipt Actions */
.receipt-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.btn-receipt {
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-print {
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b35 100%);
    color: white;
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 60, 0, 0.4);
}

.btn-download {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.btn-close-receipt {
    background: #444;
    color: white;
}

.btn-close-receipt:hover {
    background: #555;
}

/* =============================================
   ENHANCED HISTORY MODAL STYLES
   ============================================= */

.history-modal-content {
    max-width: 650px;
    padding: 0;
    overflow: hidden;
}

.history-header {
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b35 100%);
    padding: 30px;
    text-align: center;
    position: relative;
}

.history-icon {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 10px;
    display: block;
}

.history-header h2 {
    color: white;
    margin: 0;
    font-size: 1.6rem;
}

.history-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 5px;
}

.history-list-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
}

/* History Cards */
.history-card-enhanced {
    background: linear-gradient(135deg, #252525 0%, #1e1e1e 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.history-card-enhanced::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary);
}

.history-card-enhanced:hover {
    transform: translateX(5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(255, 60, 0, 0.15);
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.history-order-info {
    flex: 1;
}

.history-order-id {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.history-order-date {
    color: #888;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Status Badges */
.order-status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.status-confirmed {
    background: rgba(33, 150, 243, 0.15);
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.status-shipped {
    background: rgba(156, 39, 176, 0.15);
    color: #9C27B0;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.status-completed {
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-cancelled {
    background: rgba(244, 67, 54, 0.15);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* History Items */
.history-items-list {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #444;
}

.history-item-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
}

.history-item-name {
    color: #ccc;
    flex: 1;
}

.history-item-qty {
    color: #888;
    margin: 0 15px;
}

.history-item-price {
    color: var(--primary);
    font-weight: 500;
}

/* History Footer */
.history-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.history-total span {
    color: var(--primary);
}

.btn-view-receipt {
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b35 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-view-receipt:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 60, 0, 0.4);
}

/* Empty History State */
.history-empty {
    text-align: center;
    padding: 50px 20px;
}

.history-empty i {
    font-size: 4rem;
    color: #444;
    margin-bottom: 20px;
}

.history-empty p {
    color: #888;
    font-size: 1.1rem;
}

/* =============================================
   PRINT STYLES
   ============================================= */

@media print {
    body * {
        visibility: hidden;
    }

    #receiptModal,
    #receiptModal * {
        visibility: visible;
    }

    #receiptModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white !important;
    }

    .receipt-professional {
        box-shadow: none !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .receipt-actions {
        display: none !important;
    }

    .receipt-watermark {
        color: rgba(76, 175, 80, 0.05) !important;
    }
}