/* ShopZone - Mobile-First CSS */
/* Native App Feel - White Theme */

:root {
    --primary: #2874f0;
    --primary-dark: #1a5dc8;
    --primary-light: #e8f0fe;
    --green: #388e3c;
    --green-light: #e8f5e9;
    --green-bg: #f1f8e9;
    --orange: #ff9800;
    --red: #d32f2f;
    --red-light: #ffebee;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 50%;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 480px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

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

/* Ensure responsive image attributes don't override CSS display sizes */
.product-card-image,
.product-image-main,
.cart-item-image,
.wishlist-item-image,
.review-image,
.product-image-thumb,
.category-item img {
    width: 100%;
    height: auto;
}

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

button {
    font-family: var(--font);
    cursor: pointer;
    border: none;
    background: none;
    font-size: inherit;
}

input, textarea, select {
    font-family: var(--font);
    font-size: 1rem;
}

/* ============ HEADER ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    gap: 8px;
}

.menu-btn {
    padding: 4px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

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

.header-icon {
    position: relative;
    padding: 4px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
}

.header-icon .badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--red);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ============ SIDE NAVIGATION ============ */
.side-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.side-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-nav {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateX(-100vw);
    width: 100%;
    max-width: var(--max-width);
    height: 100%;
    background: var(--white);
    z-index: 201;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.side-nav.active {
    transform: translateX(-50%);
}

.side-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--primary);
    color: var(--white);
}

.side-nav-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.side-nav-close {
    color: var(--white);
    padding: 4px;
}

.side-nav-body {
    padding: 8px 0;
}

.side-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-800);
    font-size: 0.93rem;
    font-weight: 500;
    transition: background 0.15s;
}

.side-nav-link:hover,
.side-nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.side-nav-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 6px 16px;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    min-height: calc(100vh - 60px);
    background: var(--white);
}

/* ============ SEARCH BAR ============ */
.search-bar {
    padding: 6px 10px 10px;
    position: sticky;
    top: 48px;
    z-index: 50;
    background: var(--white);
}

.search-bar-inner {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    gap: 8px;
    border: 1px solid var(--gray-200);
    transition: border-color 0.2s;
}

.search-bar-inner:focus-within {
    border-color: var(--primary);
    background: var(--white);
}

.search-bar-inner svg {
    flex-shrink: 0;
    color: var(--gray-500);
}

.search-bar input {
    flex: 1;
    border: none;
    background: none;
    padding: 9px 0;
    outline: none;
    color: var(--gray-900);
    font-size: 0.9rem;
}

.search-bar input::placeholder {
    color: var(--gray-500);
}

/* ============ CATEGORIES ============ */
.categories-section {
    padding: 10px 0;
    border-bottom: 6px solid var(--gray-100);
}

.categories-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 62px;
    scroll-snap-align: start;
}

.category-item img {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--gray-200);
    transition: border-color 0.2s;
}

.category-item:hover img {
    border-color: var(--primary);
}

.category-item span {
    font-size: 0.72rem;
    color: var(--gray-700);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    max-width: 62px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ BANNER ============ */
.banner-section {
    padding: 8px 3px;
    border-bottom: 6px solid var(--gray-100);
}

.banner-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 6px;
    padding: 0 1px;
}

.banner-slider::-webkit-scrollbar {
    display: none;
}

.banner-slide {
    min-width: 100%;
    scroll-snap-align: start;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.banner-slide img {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.banner-slide .banner-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 12px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 8px 0 4px;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-300);
    transition: all 0.3s;
}

.banner-dot.active {
    background: var(--primary);
    width: 16px;
}

/* ============ PRODUCT SECTIONS ============ */
.product-section {
    padding: 12px 3px;
    border-bottom: 6px solid var(--gray-100);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px 10px;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
}

.section-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

/* ============ PRODUCT GRID ============ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0px;
    padding: 0 1px;
}

.product-card {
    background: var(--white);
    padding: 6px;
    border: 1px solid var(--gray-100);
    transition: box-shadow 0.2s;
    position: relative;
}

.product-card:active {
    box-shadow: var(--shadow-sm);
}

/* Wishlist icon on product grid cards */
.product-card-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    padding: 0;
}

.product-card-wishlist:hover {
    background: var(--white);
    transform: scale(1.1);
}

.product-card-wishlist svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--gray-600);
    stroke-width: 2;
    transition: all 0.2s;
}

.product-card-wishlist.active svg {
    fill: var(--red);
    stroke: var(--red);
}

/* Product page title with wishlist */
.product-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.product-title-row .product-title {
    flex: 1;
    min-width: 0;
}

.product-title-wishlist {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    padding: 0;
    margin-top: 2px;
}

.product-title-wishlist:hover {
    background: var(--red-light);
}

.product-title-wishlist svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--gray-500);
    stroke-width: 2;
    transition: all 0.2s;
}

.product-title-wishlist.active {
    background: var(--red-light);
}

.product-title-wishlist.active svg {
    fill: var(--red);
    stroke: var(--red);
}

.product-card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
}

.product-card-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.3;
    margin-top: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2em;
}

.product-card-price {
    margin-top: 3px;
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
}

.product-card-price .price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-900);
}

.product-card-price .mrp {
    font-size: 0.72rem;
    color: var(--gray-500);
    text-decoration: line-through;
}

.product-card-offers {
    font-size: 0.7rem;
    color: var(--green);
    font-weight: 500;
    margin-top: 2px;
}

.product-card-delivery {
    display: inline-block;
    font-size: 0.65rem;
    color: var(--green);
    font-weight: 600;
    background: var(--green-light);
    padding: 1px 6px;
    border-radius: 3px;
    margin-top: 2px;
}

.product-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.7rem;
    color: var(--white);
    background: var(--green);
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
    margin-top: 3px;
}

.product-card-rating.rating-low {
    background: #d32f2f;
}

.product-card-rating.rating-mid {
    background: #f57c00;
}

.product-card-rating.rating-high {
    background: #388e3c;
}

.product-card-rating svg {
    fill: var(--white);
    width: 10px;
    height: 10px;
}

/* ============ PRODUCT DETAIL PAGE ============ */
.product-detail {
    background: var(--white);
}

.product-images {
    position: relative;
    background: var(--gray-50);
}

.product-image-main-wrapper {
    position: relative;
    cursor: zoom-in;
    overflow: hidden;
}

.product-image-main {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: var(--white);
    transition: opacity 0.2s ease;
}

.product-image-zoom-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.product-image-zoom-hint svg {
    flex-shrink: 0;
}

.product-image-slider {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.product-image-slider::-webkit-scrollbar {
    display: none;
}

.product-image-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 2px solid var(--gray-200);
    flex-shrink: 0;
    cursor: pointer;
    transition: border-color 0.2s, opacity 0.2s;
}

.product-image-thumb:hover {
    border-color: var(--gray-500);
}

.product-image-thumb.active {
    border-color: var(--primary);
}

/* ============ PRODUCT IMAGE ZOOM OVERLAY ============ */
.product-zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.product-zoom-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-zoom-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-zoom-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
    user-select: none;
    -webkit-user-drag: none;
}

.product-zoom-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border: none;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.product-zoom-close:hover {
    background: rgba(255,255,255,0.3);
}

.product-zoom-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10;
}

.product-zoom-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.product-zoom-nav-btn:hover {
    background: rgba(255,255,255,0.3);
}

.product-zoom-counter {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
}

.product-reviews-count {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.product-rating-value {
    font-weight: 600;
}

.product-rating-value.rating-low {
    color: #d32f2f;
}

.product-rating-value.rating-mid {
    color: #f57c00;
}

.product-rating-value.rating-high {
    color: #388e3c;
}

.product-price-section {
    margin-top: 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-price-section .price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
}

.product-price-section .mrp {
    font-size: 0.95rem;
    color: var(--gray-500);
    text-decoration: line-through;
}

.product-price-section .discount {
    font-size: 0.85rem;
    color: var(--green);
    font-weight: 600;
}

/* Secure Badge */
.secure-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--gray-700);
}

.secure-badge svg {
    flex-shrink: 0;
    color: var(--green);
}

/* Product Details */
.product-details-section {
    padding: 12px;
    border-top: 6px solid var(--gray-100);
}

.product-details-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.product-details-section .description {
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.6;
}

.product-details-section .description p {
    margin-bottom: 8px;
}

.product-details-section .description ul {
    padding-left: 18px;
    margin-bottom: 8px;
}

.product-details-section .description li {
    margin-bottom: 4px;
}

/* Action Buttons */
.product-actions {
    padding: 12px;
    display: flex;
    gap: 8px;
    border-top: 6px solid var(--gray-100);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    flex: 1;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    flex: 1;
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-success {
    background: var(--green);
    color: var(--white);
}

.btn-danger {
    background: var(--red);
    color: var(--white);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

.btn-loading .btn-text {
    visibility: hidden;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-outline.btn-loading::after {
    border-color: rgba(40,116,240,0.3);
    border-top-color: var(--primary);
}

/* Reviews Section */
.reviews-section {
    padding: 12px;
    border-top: 6px solid var(--gray-100);
}

.reviews-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.review-card {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.review-card:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.review-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.review-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-800);
}

.review-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--green);
    color: var(--white);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

.review-rating.rating-low {
    background: #d32f2f;
}

.review-rating.rating-mid {
    background: #f57c00;
}

.review-rating.rating-high {
    background: #388e3c;
}

.review-date {
    font-size: 0.72rem;
    color: var(--gray-500);
    margin-left: auto;
}

.review-text {
    font-size: 0.82rem;
    color: var(--gray-700);
    line-height: 1.5;
    margin-top: 4px;
}

/* Review Image - looks like customer attached photo */
.review-image-wrapper {
    margin-top: 8px;
}

.review-image {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--gray-100);
}

.review-image:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transform: scale(1.05);
}

/* Review Image Lightbox */
.review-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.review-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.review-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.review-lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.review-lightbox-close {
    position: absolute;
    top: -36px;
    right: 0;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border: none;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.review-lightbox-close:hover {
    background: rgba(255,255,255,0.4);
}

/* Similar Products */
.similar-section {
    padding: 12px 3px;
    border-top: 6px solid var(--gray-100);
}

/* ============ CART PAGE ============ */
.cart-page {
    padding: 10px;
}

.cart-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--gray-100);
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-800);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-top: 4px;
}

.cart-item-mrp {
    font-size: 0.72rem;
    color: var(--gray-500);
    text-decoration: line-through;
    margin-left: 4px;
}

.cart-item-delivery {
    font-size: 0.72rem;
    color: var(--green);
    font-weight: 500;
    margin-top: 2px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 8px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    display: inline-flex;
    overflow: hidden;
}

.qty-btn {
    width: 30px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary);
    background: var(--gray-50);
    font-weight: 600;
}

.qty-btn:active {
    background: var(--gray-200);
}

.qty-value {
    width: 34px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    border-left: 1px solid var(--gray-300);
    border-right: 1px solid var(--gray-300);
}

.cart-item-remove {
    position: absolute;
    top: 10px;
    right: 0;
    color: var(--gray-500);
    padding: 4px;
}

.cart-summary {
    background: var(--gray-50);
    padding: 14px;
    border-radius: var(--radius-md);
    margin-top: 14px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.cart-summary-row.total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    border-top: 1px solid var(--gray-300);
    padding-top: 10px;
    margin-top: 5px;
}

.cart-summary-row .savings {
    color: var(--green);
    font-weight: 600;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty svg {
    color: var(--gray-400);
    margin-bottom: 12px;
}

.cart-empty h3 {
    font-size: 1.05rem;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.cart-empty p {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ============ CHECKOUT PAGE ============ */
.checkout-steps {
    display: flex;
    padding: 12px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.checkout-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding-bottom: 6px;
}

.checkout-step::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gray-200);
    border-radius: 2px;
}

.checkout-step.active::after {
    background: var(--primary);
}

.checkout-step.completed::after {
    background: var(--green);
}

.checkout-step-num {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray-400);
}

.checkout-step.active .checkout-step-num,
.checkout-step.completed .checkout-step-num {
    color: var(--primary);
}

.checkout-step-label {
    font-size: 0.72rem;
    color: var(--gray-500);
    margin-top: 2px;
}

.checkout-step.active .checkout-step-label {
    color: var(--primary);
    font-weight: 600;
}

.checkout-step.completed .checkout-step-label {
    color: var(--green);
}

.checkout-form {
    padding: 14px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.form-group label .required {
    color: var(--red);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--gray-900);
    background: var(--white);
    transition: border-color 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
}

.form-control::placeholder {
    color: var(--gray-400);
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23757575' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

.checkout-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--gray-200);
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s;
}

.payment-method.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-method input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.payment-method-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-method-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-800);
}

.payment-method.payment-disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: var(--gray-50);
}

.payment-method.payment-disabled .payment-method-label {
    color: var(--gray-500);
}

.payment-method.payment-disabled input[type="radio"] {
    cursor: not-allowed;
}

.payment-error-text {
    font-size: 0.72rem;
    color: var(--red);
    font-weight: 600;
}

/* Order Summary in Checkout */
.order-summary-checkout {
    background: var(--gray-50);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.order-summary-item.total {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-900);
    border-top: 1px solid var(--gray-300);
    padding-top: 8px;
    margin-top: 4px;
}

/* ============ WISHLIST PAGE ============ */
.wishlist-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--gray-200);
}

.wishlist-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--gray-100);
    flex-shrink: 0;
}

.wishlist-item-info {
    flex: 1;
    min-width: 0;
}

.wishlist-item-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-800);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wishlist-item-price {
    font-size: 0.92rem;
    font-weight: 700;
    margin-top: 4px;
}

.wishlist-item-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

/* ============ CATEGORY PAGE ============ */
.category-header {
    padding: 12px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.category-header h1 {
    font-size: 1.1rem;
    font-weight: 700;
}

.category-header p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ============ SEARCH RESULTS ============ */
.search-header {
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.search-header h2 {
    font-size: 1rem;
    font-weight: 700;
}

.search-header p {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ============ PAGES (About, Contact, etc.) ============ */
.page-content {
    padding: 14px;
}

.page-content h1 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.page-content h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 16px 0 8px;
}

.page-content p {
    font-size: 0.88rem;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 10px;
}

.contact-form {
    padding: 14px;
}

/* ============ COUPON SECTION ============ */
.coupon-section {
    margin-bottom: 14px;
}

.coupon-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.coupon-input-row .form-control {
    flex: 1;
}

.coupon-input-row .btn {
    white-space: nowrap;
    padding: 10px 16px;
}

.coupon-applied {
    background: var(--green-light);
    border: 1px solid var(--green);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.82rem;
    color: var(--green);
    font-weight: 500;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.coupon-remove {
    color: var(--red);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.78rem;
}

/* ============ FOOTER ============ */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 20px 14px 14px;
}

.footer-columns {
    display: flex;
    gap: 16px;
}

.footer-columns .footer-section {
    flex: 1;
    min-width: 0;
}

.footer-section h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gray-100);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section a {
    display: block;
    font-size: 0.72rem;
    color: var(--gray-400);
    padding: 2px 0;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 12px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.72rem;
    color: var(--gray-500);
}

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-900);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    z-index: 300;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: calc(var(--max-width) - 40px);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============ LOADING OVERLAY ============ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============ AD UNITS ============ */
.ad-unit {
    padding: 8px 10px;
    text-align: center;
    min-height: 50px;
}

/* ============ ORDER SUCCESS ============ */
.order-success {
    text-align: center;
    padding: 40px 20px;
}

.order-success svg {
    color: var(--green);
    margin-bottom: 14px;
}

.order-success h2 {
    font-size: 1.2rem;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.order-success p {
    font-size: 0.88rem;
    color: var(--gray-600);
}

.order-success .order-id {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
}

/* ============ BACK BUTTON ============ */
.page-top-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-top-bar h1 {
    font-size: 1rem;
    font-weight: 700;
    flex: 1;
}

.back-btn {
    color: var(--gray-800);
    padding: 2px;
    display: flex;
    align-items: center;
}

/* ============ PAGINATION ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 16px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.pagination span.current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--gray-400);
}

/* ============ RESPONSIVE ============ */
/* Only mobile layout - desktop shows mobile centered */

@media (min-width: 481px) {
    body {
        box-shadow: 0 0 30px rgba(0,0,0,0.08);
    }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 6px;
    width: 80%;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1;
}

/* ============ COUPON BADGE DISPLAY ============ */
.coupon-badge-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--green-light);
    border: 1px dashed var(--green);
    border-radius: var(--radius-sm);
    margin: 0 12px;
    margin-bottom: 6px;
}

.coupon-badge-display:first-child {
    margin-top: 10px;
}

.coupon-badge-text {
    font-size: 0.82rem;
    color: var(--green);
    font-weight: 500;
    line-height: 1.4;
}

.coupon-badge-text strong {
    background: var(--green);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    margin: 0 2px;
}

.coupon-copy-btn {
    background: var(--green);
    color: var(--white);
    border: none;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
    font-family: var(--font);
}

.coupon-copy-btn:hover {
    background: #2e7d32;
}

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

.coupon-copy-btn.copied {
    background: #1b5e20;
}

/* Checkout page coupon badge adjustments */
.checkout-form .coupon-badge-display {
    margin: 0 0 8px 0;
}

.checkout-form .coupon-badge-display:first-child {
    margin-top: 0;
}

/* ============ CATEGORY GRID AD ============ */
.category-grid-ad {
    grid-column: 1 / -1;
    padding: 4px 6px;
    text-align: center;
    min-height: 50px;
}

.category-grid-ad .ad-unit {
    padding: 6px 4px;
}
