:root {
    color-scheme: light only;
    --primary-color: #10b981; /* Emerald green */
    --primary-dark: #059669;
    --bg-color: #f3f4f6;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --danger: #ef4444;
    --border-radius: 16px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kantumruy Pro', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    background-image: 
        radial-gradient(at 0% 0%, hsla(152,100%,74%,0.2) 0px, transparent 50%),
        radial-gradient(at 100% 0%, hsla(189,100%,74%,0.2) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

#app {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 20px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-name {
    font-family: 'Khmer OS Muol', 'Moul', cursive;
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin: 0;
    line-height: 1;
    padding-top: 5px; /* Adjust vertical alignment for Khmer font */
}

.store-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--text-main);
    padding: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.cart-icon:active {
    transform: scale(0.9);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    height: 20px;
    min-width: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Categories */
.categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 4px 10px 4px;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
.categories::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.category-btn {
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    user-select: none;
}

.category-btn:hover {
    color: var(--text-main);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.category-btn:active {
    transform: scale(0.96);
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* Products Grid */
.main-content {
    padding: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: var(--glass-border);
    backdrop-filter: blur(5px);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: white;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.product-info {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-price {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.product-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: normal;
}

.add-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.add-btn:active {
    transform: scale(0.95);
    background: var(--primary-dark);
}

.qty-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    margin-top: auto;
}

.qty-btn {
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    color: var(--primary-dark);
    transition: transform 0.1s;
}

.qty-btn:active {
    transform: scale(0.9);
}

.qty-display {
    font-weight: 600;
    font-size: 1rem;
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-modal.show {
    opacity: 1;
    pointer-events: all;
}

.cart-modal-content {
    background-color: #ffffff;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    padding: 20px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
    box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
}

.cart-modal.show .cart-modal-content {
    transform: translateY(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.cart-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.close-btn {
    background: #f3f4f6;
    border: none;
    width: 36px;
    background: #e9ecef;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #6c757d;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-items {
    padding: 10px 20px 20px;
    flex-grow: 1;
    overflow-y: auto;
}

/* Cart Item Card UI */
.cart-item-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.cart-item-main {
    display: flex;
    align-items: center; /* keep centered for checkbox */
}

.cart-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: #10b981; /* Green color for native checkbox */
}

.cart-item-main img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    margin-right: 15px;
    background: #f8f9fa;
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 80px;
}

.cart-item-title {
    font-weight: 700;
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 2px;
}

.cart-item-cat {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 10px;
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-price {
    font-weight: 700;
    font-size: 1.05rem;
    color: #4b5563; /* Dark gray for price in card */
}

.cart-item-note {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Quantity Pill */
.cart-qty-pill {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 4px;
}

.cart-qty-pill button {
    background: transparent;
    border: none;
    color: #10b981;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.cart-qty-pill span {
    width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #2c3e50;
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    background-color: #ffffff;
    border-top: 1px solid #eef2f0;
    padding-bottom: 30px; /* Give room for safe area */
}

.total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.total-price span:first-child {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
}

.total-price span:last-child {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1f2937;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Kantumruy Pro';
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.get-location-btn {
    background: transparent;
    color: #10b981;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Kantumruy Pro';
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}
.get-location-btn:active {
    background: #e8f5f0;
}

.checkout-btn:active {
    transform: scale(0.98);
    background-color: var(--primary-dark);
}

/* Checkout Advanced UI */
.checkout-content {
    background: #e8f5f0;
    padding: 0;
    height: 90vh; /* Make it taller */
    max-height: 95vh;
}

.checkout-header {
    background: #e8f5f0;
    padding: 20px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 24px 24px 0 0;
}

.checkout-header h2 {
    font-size: 1.2rem;
    color: var(--text-main);
}

.back-btn {
    position: absolute;
    left: 20px;
    background: #84b7a1;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}

.checkout-body {
    overflow-y: auto;
    padding: 0 20px 20px;
    flex-grow: 1;
}

/* Stepper */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 25px;
}

.step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    color: #84b7a1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.step.active {
    background: #10b981;
    color: white;
}

.stepper-line {
    flex-grow: 1;
    max-width: 80px;
    height: 0;
    border-top: 2px dashed #b5d5c5;
    margin: 0 5px;
}

/* Delivery Methods */
.delivery-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.method-card {
    background: white;
    border-radius: 16px;
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    color: var(--text-main);
}

.method-card.active {
    border-color: #10b981;
    color: #059669;
}

.method-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #f39c12; /* Default color for icons */
}

.method-card.active .method-icon {
    color: #10b981;
}

.method-text {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Sections */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.clean-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #d1e5dc;
    padding: 12px 0;
    font-size: 1rem;
    font-family: 'Kantumruy Pro';
    color: var(--text-main);
}
.clean-input:focus {
    outline: none;
    border-bottom-color: #10b981;
}

.recipient-info {
    margin-bottom: 25px;
}

/* Time Selection */
.time-selection {
    background: rgba(255,255,255,0.6);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 25px;
}

.time-dropdowns {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    background: white;
    padding: 10px 15px;
    border-radius: 20px;
}

.time-select {
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: 'Kantumruy Pro';
    font-weight: 600;
    outline: none;
}

.quick-times {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-btn {
    background: transparent;
    border: 1px solid #10b981;
    color: #10b981;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Kantumruy Pro';
    transition: all 0.2s;
}

.quick-btn.active {
    background: #10b981;
    color: white;
}

/* Note */
.note-section {
    margin-bottom: 20px;
}
.note-input {
    width: 100%;
    background: white;
    border: none;
    border-radius: 20px;
    padding: 15px;
    font-size: 1rem;
    font-family: 'Kantumruy Pro';
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.note-input:focus {
    outline: none;
}

/* Bottom Bar */
.checkout-bottom-bar {
    background: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

.checkout-summary {
    display: flex;
    flex-direction: column;
}

.checkout-summary span:first-child {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.checkout-summary span:last-child {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
}

.final-order-btn {
    background: #b58d3d; /* Golden color from screenshot */
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Kantumruy Pro';
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(181, 141, 61, 0.3);
}

.final-order-btn:active {
    transform: scale(0.95);
}

/* ==========================================
   PRODUCT IMAGE SLIDER & GALLERY STYLES
   ========================================== */
.product-img-wrapper {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: white;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

.card-slider-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-slider-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    position: relative;
}

.card-slider-slide .product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.card-slider-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 5;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 10px;
    backdrop-filter: blur(3px);
}

.card-slider-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.25s ease;
}

.card-slider-dot.active {
    width: 12px;
    border-radius: 4px;
    background: white;
}

.card-slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    z-index: 6;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, transform 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.product-card:hover .card-slide-btn {
    opacity: 1;
}

@media (hover: none) {
    .card-slide-btn {
        opacity: 0.8;
    }
}

.card-slide-btn.prev {
    left: 6px;
}

.card-slide-btn.next {
    right: 6px;
}

.card-slide-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

/* Product Detail Modal */
.product-detail-modal-content {
    background: white;
    width: 92%;
    max-width: 440px;
    max-height: 90vh;
    border-radius: 20px;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

.modal-gallery-container {
    position: relative;
    width: 100%;
    padding-top: 85%;
    background: #f8fafc;
    overflow: hidden;
    user-select: none;
}

.modal-gallery-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-gallery-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    position: relative;
}

.modal-gallery-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
}

.modal-gallery-counter {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    z-index: 5;
}

.modal-gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    background: #fdfdfd;
    overflow-x: auto;
    border-bottom: 1px solid #f1f5f9;
}

.modal-gallery-thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    transition: all 0.2s;
    background: #f1f5f9;
}

.modal-gallery-thumb.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.modal-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-close-round {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    z-index: 10;
    transition: background 0.2s, transform 0.2s;
}

.modal-close-round:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.08);
}

/* ===================================================
   FULL-PAGE PRODUCT DETAIL VIEW (ទំព័រលម្អិតផលិតផល)
   =================================================== */
.product-detail-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #f8fafc;
    z-index: 1900;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}

.product-detail-page.active {
    transform: translateX(0);
}

.pdp-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 20;
    height: 56px;
    box-sizing: border-box;
}

.pdp-back-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pdp-back-btn:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}

.pdp-header-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    max-width: 55%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.pdp-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdp-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.pdp-icon-btn:hover {
    background: #e2e8f0;
    color: #10b981;
}

.pdp-cart-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.pdp-scroll-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 95px;
}

/* Gallery Section */
.pdp-gallery-card {
    background: white;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.pdp-gallery-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 420px;
    overflow: hidden;
    background: #ffffff;
    user-select: none;
    touch-action: pan-y pinch-zoom;
}

.pdp-gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdp-gallery-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.pdp-gallery-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 12px;
}

.pdp-gallery-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 14px;
    z-index: 5;
}

.pdp-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    transition: all 0.2s;
}

.pdp-nav-arrow.prev { left: 12px; }
.pdp-nav-arrow.next { right: 12px; }
.pdp-nav-arrow:hover { background: white; transform: translateY(-50%) scale(1.1); }

.pdp-thumbnails {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.pdp-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.pdp-thumb.active {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    transform: scale(1.04);
}

.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* PDP Info Cards */
.pdp-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pdp-card {
    background: white;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef2f6;
}

.pdp-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0284c7;
    background: #e0f2fe;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.pdp-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 12px;
}

.pdp-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.pdp-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: #059669;
    font-family: 'Kantumruy Pro', sans-serif;
}

.pdp-unit {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    margin-left: 4px;
}

.pdp-stock-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.pdp-stock-badge.in {
    background: #ecfdf5;
    color: #059669;
}

.pdp-stock-badge.out {
    background: #fef2f2;
    color: #ef4444;
}

/* Feature Perks Grid */
.pdp-perks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.pdp-perk-item {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pdp-perk-item i {
    font-size: 1.1rem;
    color: #10b981;
}

/* Section Titles */
.pdp-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdp-desc-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #475569;
    white-space: pre-line;
    margin: 0;
}

/* Related Products Horizontal Scroll */
.pdp-related-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.pdp-related-card {
    min-width: 140px;
    max-width: 140px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.pdp-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.pdp-related-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.pdp-related-info {
    padding: 8px;
}

.pdp-related-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.pdp-related-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #059669;
}

/* PDP Sticky Bottom Action Bar */
.pdp-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #e2e8f0;
    padding: 10px 16px;
    z-index: 25;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 680px;
    margin: 0 auto;
    box-sizing: border-box;
}

.pdp-qty-wrap {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 3px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.pdp-qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: none;
    background: white;
    color: #1e293b;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.15s;
}

.pdp-qty-btn:active {
    transform: scale(0.92);
}

.pdp-qty-num {
    min-width: 32px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
}

.pdp-btn-add {
    flex: 1;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    font-family: 'Kantumruy Pro', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    transition: all 0.2s;
    white-space: nowrap;
}

.pdp-btn-add:hover {
    background: #059669;
}

.pdp-btn-buy {
    flex: 1;
    background: #0284c7;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    font-family: 'Kantumruy Pro', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    transition: all 0.2s;
    white-space: nowrap;
}

.pdp-btn-buy:hover {
    background: #0369a1;
}

/* Variant Modal Styles */
.variant-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.variant-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    position: relative;
}
.variant-item.selected {
    border-color: #ea580c;
    background: #fff7ed;
}
.variant-item.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 0;
    right: 0;
    background: #ea580c;
    color: white;
    font-size: 0.6rem;
    padding: 3px 6px;
    border-radius: 8px 0 0 0;
}
.variant-item img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 5px;
}
.variant-item-name {
    font-size: 0.75rem;
    color: #334155;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Kantumruy Pro';
}
.variant-item-desc {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 2px;
}
