/* Amazon-Style Local Store Theme */

/* Root variables - Amazon-inspired color palette */
:root {
    --amazon-orange: #ff9900;
    --amazon-blue: #146eb4;
    --amazon-dark-blue: #232f3e;
    --amazon-light-gray: #f7f8fa;
    --amazon-border-gray: #d5d9d9;
    --amazon-text-gray: #565959;
    --amazon-dark-gray: #37475a;
    --success-green: #067d62;
    --danger-red: #d32f2f;
    --warning-yellow: #ff9900;
    --font-base: calc(clamp(10px, 0.84vw + 0.28rem, 11.2px) + 1px);
    --font-h1: calc(var(--font-base) * 1.75);
    --font-h2: calc(var(--font-base) * 1.5);
    --font-h3: calc(var(--font-base) * 1.3);
    --radius-base: 6px;
}

/* Products grid specific font tweaks: -2px title and current price */
.products-grid .card-title {
    font-size: 13px;
}

.products-grid .price-main {
    font-size: 19px;
}

/* Discount badge for big discounts (flash-sale style) */
.product-card .discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--amazon-orange);
    color: var(--amazon-dark-blue);
    font-weight: 700;
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 12px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Global styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: var(--font-base);
    line-height: 1.6;
    color: var(--amazon-dark-gray);
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 700;
    color: var(--amazon-dark-blue);
    margin: 0 0 8px 0;
}

h1 {
    font-size: var(--font-h1);
}

h2 {
    font-size: var(--font-h2);
}

h3 {
    font-size: var(--font-h3);
}

h4 {
    font-size: calc(var(--font-base) * 1.1);
}

h5 {
    font-size: calc(var(--font-base) * 1);
}

p {
    margin: 0 0 12px 0;
    color: var(--amazon-text-gray);
}

a {
    color: var(--amazon-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--amazon-dark-blue);
    text-decoration: underline;
}

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

.row {
    margin: 0 -10px;
}

.col {
    padding: 0 10px;
}

/* Navigation - Sticky Header with Shrink Effect */
.navbar {
    background: #000000 !important;
    border-bottom: 3px solid var(--amazon-orange);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-bottom-width: 2px;
}

/* Logo shrink animation */
.navbar-brand {
    font-size: 25px;
    font-weight: bold;
    color: white !important;
    padding: 15px 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled .navbar-brand {
    font-size: 20px;
    padding: 10px 20px;
}

.navbar-brand img {
    height: 40px;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled .navbar-brand img {
    height: 32px;
}

.navbar-nav .nav-link {
    color: white !important;
    padding: 15px 20px;
    font-weight: 400;
    transition: all 0.3s ease;
    font-size: 15px;
}

.navbar.scrolled .navbar-nav .nav-link {
    padding: 12px 20px;
    font-size: 14px;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--amazon-orange) !important;
}

/* Add spacing below navbar for fixed positioning */
body {
    padding-top: 80px;
}

body.navbar-scrolled {
    padding-top: 65px;
}

/* Breadcrumb navigation - Amazon style */
.breadcrumb {
    background: white;
    padding: 12px 0;
    margin-bottom: 20px;
    font-size: 13px;
}

.breadcrumb-item {
    color: var(--amazon-text-gray);
}

.breadcrumb-item.active {
    color: var(--amazon-dark-gray);
    font-weight: 600;
}

.breadcrumb-item a {
    color: var(--amazon-blue);
}

/* Buttons - Amazon style */
.btn {
    border-radius: 4px;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    font-size: 15px;
}

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

.add-to-cart.clicked {
    animation: btn-bump 300ms ease;
}

@keyframes btn-bump {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }

    100% {
        transform: scale(1);
    }
}

.btn-primary {
    background: var(--amazon-orange);
    border-color: var(--amazon-orange);
    color: var(--amazon-dark-blue);
}

.btn-primary:hover {
    background: #e68900;
    border-color: #e68900;
    color: var(--amazon-dark-blue);
}

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

.btn-success:hover {
    background: #056b53;
    border-color: #056b53;
}

.btn-outline-primary {
    color: var(--amazon-blue);
    border-color: var(--amazon-blue);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--amazon-blue);
    border-color: var(--amazon-blue);
    color: white;
}

/* Cards - Amazon style */
.card {
    background: white;
    border: 1px solid var(--amazon-border-gray);
    border-radius: 4px;
    /* default, overridden below for consistency */
    box-shadow: 0 2px 5px rgba(15, 17, 17, 0.15);
    margin-bottom: 20px;
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid var(--amazon-border-gray);
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Product cards - Modern Enhanced Design */
.product-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--amazon-border-gray);
    height: 100%;
    background: white;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.home-hero-carousel {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 17, 17, 0.2);
    background: var(--amazon-dark-blue);
}

.home-hero-carousel .carousel-overlay {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 360px;
}

.home-hero-carousel .overlay-gradient {
    position: relative;
    padding: 40px;
    background: linear-gradient(90deg, rgba(19, 25, 33, 0.92) 0%, rgba(19, 25, 33, 0.62) 45%, rgba(19, 25, 33, 0.1) 100%);
    color: white;
}

.home-hero-carousel h2 {
    color: white;
    font-size: calc(var(--font-base) * 2.24);
    font-weight: 700;
}

.home-hero-carousel p {
    color: rgba(255, 255, 255, 0.85);
    font-size: calc(var(--font-base) * 1.07);
}

.price-main,
.price-original,
.price-discount {
    color: #111;
}

/* Default price color hierarchy (overridden by scoped sections like Big Discounts) */
.product-card .price-main {
    color: var(--amazon-blue);
    font-weight: 700;
}

.product-card .price-original {
    color: var(--amazon-text-gray);
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    margin-left: 4px;
}

.btn-hero {
    background: var(--amazon-orange);
    color: var(--amazon-dark-blue);
    border-color: var(--amazon-orange);
    font-weight: 700;
    padding: 10px 24px;
}

.btn-hero:hover {
    background: #e68900;
    border-color: #e68900;
    color: var(--amazon-dark-blue);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
}

.carousel-indicators .active {
    background-color: var(--amazon-orange);
}

.new-arrivals-section {
    position: relative;
}

.new-arrivals-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(160px, 1fr);
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 6px;
}

.new-arrivals-track::-webkit-scrollbar {
    height: 6px;
}

.new-arrivals-track::-webkit-scrollbar-thumb {
    background: rgba(20, 110, 180, 0.4);
    border-radius: 3px;
}

.new-arrivals-card {
    min-width: 160px;
}

/* New Arrivals compact card tweaks */
.new-arrivals-card .img-wrap {
    position: relative;
}

.new-arrivals-card .card-img-top {
    height: 140px;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.new-arrivals-card .price-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: var(--amazon-orange);
    color: var(--amazon-dark-blue);
    font-weight: 700;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
}

.new-arrivals-card .card-body {
    padding: 10px;
}

.new-arrivals-card .card-title {
    font-size: 13px;
    text-align: center;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.new-arrivals-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(35, 47, 62, 0.85);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s ease;
}

.new-arrivals-nav:hover {
    background: rgba(255, 153, 0, 0.9);
    color: var(--amazon-dark-blue);
}

.new-arrivals-nav.prev {
    left: -18px;
}

.new-arrivals-nav.next {
    right: -18px;
}

.product-card .card-img-top {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Consistent border radius across cards and images */
.card,
.product-card,
.category-card {
    border-radius: var(--radius-base);
}

.product-card .card-img-top,
.category-card .card-img-top {
    border-radius: var(--radius-base);
}

.product-card .card-body {
    padding: 15px;
}

/* Quick-view overlay and stock badge - Enhanced */
.product-card .img-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-base);
}

.product-card .quick-view {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    backdrop-filter: blur(8px);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
    border-radius: var(--radius-base);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.product-card .img-wrap:hover .quick-view {
    opacity: 1;
}

/* Quick action buttons on hover */
.product-card .quick-actions {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.product-card:hover .quick-actions {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.product-card .quick-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-card .quick-action-btn:hover {
    transform: scale(1.1);
    background: var(--amazon-orange);
    color: white;
    box-shadow: 0 6px 12px rgba(255, 153, 0, 0.3);
}

.product-card .stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.product-card .card-title {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--amazon-dark-blue);
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .card-text {
    font-size: 14px;
    color: var(--amazon-text-gray);
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Price styling */
.price-original {
    text-decoration: line-through;
    color: var(--amazon-text-gray);
    font-size: 13px;
}

.price-current {
    font-size: 15px;
    font-weight: 700;
    color: var(--amazon-dark-blue);
}

.price-discount {
    color: var(--success-green);
    font-weight: 600;
    font-size: 13px;
}

.price-main .currency-symbol,
.price-original .currency-symbol,
.price-current .currency-symbol {
    display: inline-block;
    margin-right: 4px;
    font-size: calc(100% - 2px);
}

/* Big Discounts section: red color with fixed sizes */
.big-discounts-section .price-main {
    font-size: 16px;
    color: var(--danger-red);
}

.big-discounts-section .price-original {
    font-size: 14px;
}

/* Featured Products section: black color with fixed sizes */
.featured-products-section .price-main {
    color: #111;
    font-size: 16px;
}

.featured-products-section .price-original {
    font-size: 14px;
}

/* Category title ellipsis */
.shop-by-category-section .card-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category card hover */
.category-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    background: transparent;
}

.category-tile:hover {
    transform: translateY(-4px);
    background: #f8f9fa;
    box-shadow: 0 6px 16px rgba(15, 17, 17, 0.18);
}

.category-image-wrap {
    width: 100%;
    max-width: 160px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(21, 41, 53, 0.08);
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-tile:hover .category-image {
    transform: scale(1.05);
}

.category-name span {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--amazon-dark-blue);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.category-tile:hover .category-name span {
    color: var(--amazon-blue);
}

/* Section headers: subtle background and orange underline */
.section-header {
    background: #f0f2f5;
    padding: 10px 12px;
    border-radius: 6px;
}

.section-header h2 {
    position: relative;
    padding-bottom: 6px;
}

.section-header h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--amazon-orange);
    border-radius: 2px;
}

.section-header .view-all-btn {
    font-weight: 600;
    text-decoration: none;
}

.section-header .view-all-btn::after {
    content: " \2192";
}

/* Increase gutters within key grids */
.shop-by-category-section .row.g-3,
.best-sellers-section .row.g-3,
.big-discounts-section .row.g-3,
.top-rated-section .row.g-3 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* Phase 3: Responsive tuning for small screens */
@media (max-width: 576px) {

    /* Reduce inner padding to make room for titles/prices */
    .product-card .card-body {
        padding: 10px;
    }

    /* Slightly reduce displayed height of square images but keep 1:1 aspect feel */
    .product-card .card-img-top {
        max-height: 140px;
    }
}

/* Responsive adjustments for product cards */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 15px;
    }

    .product-card .card-body {
        padding: 12px;
    }

    .product-card .card-title {
        font-size: 14px;
    }
}

/* ==========================================
   MODERN ANIMATIONS & ENHANCEMENTS
   ========================================== */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Page load fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply animations to sections on page load */
.section-header {
    animation: fadeIn 0.6s ease-out;
}

.product-card {
    animation: fadeInUp 0.6s ease-out both;
}

/* Stagger animation delays for product grid */
.product-card:nth-child(1) {
    animation-delay: 0.05s;
}

.product-card:nth-child(2) {
    animation-delay: 0.1s;
}

.product-card:nth-child(3) {
    animation-delay: 0.15s;
}

.product-card:nth-child(4) {
    animation-delay: 0.2s;
}

.product-card:nth-child(5) {
    animation-delay: 0.25s;
}

.product-card:nth-child(6) {
    animation-delay: 0.3s;
}

.product-card:nth-child(7) {
    animation-delay: 0.35s;
}

.product-card:nth-child(8) {
    animation-delay: 0.4s;
}

.product-card:nth-child(9) {
    animation-delay: 0.45s;
}

.product-card:nth-child(10) {
    animation-delay: 0.5s;
}

.product-card:nth-child(11) {
    animation-delay: 0.55s;
}

.product-card:nth-child(12) {
    animation-delay: 0.6s;
}

/* Enhanced button ripple effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Skeleton loader for images */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: var(--radius-base);
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    margin-bottom: 10px;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #667eea;
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

/* Utility Classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Smooth transitions for all interactive elements */
a,
button,
input,
select,
textarea {
    transition: all 0.2s ease;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Image lazy loading fade-in */
img[loading="lazy"] {
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Product detail page - Amazon style */
.product-detail-container {
    background: white;
    padding: 20px;
    border: 1px solid var(--amazon-border-gray);
    border-radius: 4px;
    margin-bottom: 20px;
}

.product-images {
    position: relative;
}

.main-image {
    border: 1px solid var(--amazon-border-gray);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.thumbnail.active {
    border-color: var(--amazon-orange);
}

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

/* Product information section */
.product-info h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--amazon-dark-blue);
    margin-bottom: 15px;
    line-height: 1.2;
}

.price-section {
    border-bottom: 1px solid var(--amazon-border-gray);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.price-main {
    font-size: 24px;
    font-weight: 700;
    color: var(--amazon-dark-blue);
    text-shadow: none !important;
}

.price-original {
    font-size: 14px;
    color: var(--amazon-text-gray);
    text-decoration: line-through;
    margin-left: 10px;
}

.price-save {
    background: var(--success-green);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

/* Variant selection (colors, sizes) */
.variant-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.variant-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--amazon-dark-gray);
}

.variant-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.variant-option {
    padding: 8px 16px;
    border: 1px solid var(--amazon-border-gray);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.variant-option:hover {
    border-color: var(--amazon-blue);
}

.variant-option.selected {
    border-color: var(--amazon-orange);
    background: var(--amazon-orange);
    color: white;
}

.variant-price {
    font-size: 12px;
    color: var(--amazon-text-gray);
    margin-top: 2px;
}

/* Specifications section */
.specs-section {
    margin: 20px 0;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.spec-label {
    font-weight: 600;
    color: var(--amazon-dark-gray);
}

.spec-value {
    color: var(--amazon-text-gray);
}

/* Tabs styling - Amazon style */
.nav-tabs {
    border-bottom: 2px solid var(--amazon-border-gray);
    margin-bottom: 20px;
}

.nav-tabs .nav-link {
    border: none;
    background: transparent;
    color: var(--amazon-text-gray);
    padding: 12px 20px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link.active {
    color: var(--amazon-blue);
    border-bottom-color: var(--amazon-blue);
}

.nav-tabs .nav-link:hover {
    color: var(--amazon-blue);
    border-bottom-color: var(--amazon-blue);
}

.tab-content {
    padding: 20px 0;
}

/* Forms */
.form-control {
    border: 1px solid var(--amazon-border-gray);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--amazon-blue);
    box-shadow: 0 0 0 3px rgba(20, 110, 180, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--amazon-dark-gray);
    margin-bottom: 8px;
}

/* Alerts */
.alert {
    border-radius: 4px;
    border: 1px solid transparent;
    padding: 12px 16px;
}

.alert-success {
    background: #e8f5e8;
    border-color: var(--success-green);
    color: var(--success-green);
}

.alert-danger {
    background: #fce8e8;
    border-color: var(--danger-red);
    color: var(--danger-red);
}

.alert-warning {
    background: #fff3e0;
    border-color: var(--warning-yellow);
    color: var(--warning-yellow);
}

/* Footer */
footer {
    background: var(--amazon-dark-blue);
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
    font-size: 15px;
}

footer h5,
footer h6 {
    color: white;
    font-weight: 700;
}

footer a {
    color: #ccc;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--amazon-orange);
}

/* Responsive adjustments for new arrivals slider */
@media (max-width: 576px) {
    .new-arrivals-track {
        gap: 12px;
    }

    .new-arrivals-card {
        min-width: 180px;
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--amazon-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--amazon-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--amazon-dark-blue);
}

/* Mobile bottom navigation */
@media (max-width: 992px) {
    body {
        padding-bottom: 64px;
    }

    .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        background: #ffffff;
        border-top: 1px solid var(--amazon-border-gray);
        display: flex;
        justify-content: space-around;
        padding: 8px env(safe-area-inset-right) calc(8px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
    }

    .bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        text-decoration: none;
        color: var(--amazon-dark-gray);
    }

    .bottom-nav a.active,
    .bottom-nav a:hover {
        color: var(--amazon-blue);
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #e5e5e5;
    }

    .card {
        background: #1e1e1e;
        border-color: #2a2a2a;
    }

    .card-header {
        background: #1b1b1b;
        border-color: #2a2a2a;
    }

    .navbar {
        background: #0f0f0f !important;
    }

    a {
        color: #8ab4f8;
    }

    a:hover {
        color: #aecbfa;
    }

    .bottom-nav {
        background: #171717;
        border-color: #2a2a2a;
    }
}

/* Mobile touch targets */
@media (max-width: 576px) {

    .btn,
    button,
    [role="button"],
    input[type="button"],
    input[type="submit"],
    .form-control {
        min-height: 48px;
    }

    .navbar .nav-link,
    .bottom-nav a {
        padding: 10px 8px;
    }
}

/* Print styles */
@media print {

    .navbar,
    .btn,
    footer {
        display: none !important;
    }

    .container {
        max-width: none !important;
    }
}

/* Star ratings */
.product-rating {
    margin-bottom: 8px;
}

.product-rating i {
    font-size: 14px;
}

/* Quick view modal enhancements */
#quickViewModal .modal-body {
    padding: 25px;
}

#quickViewModal .img-fluid {
    max-height: 400px;
    object-fit: contain;
}

.related-scroll .card .fw-semibold {
    font-size: 13px;
    line-height: 1.3;
    white-space: normal !important;
    /* override Bootstrap text-truncate */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    /* show up to 2 lines */
    overflow: hidden;
    max-height: calc(1.3em * 2);
    /* unify title block height */
    min-height: calc(1.3em * 2);
}

/* Products listing grid tweaks */
@media (min-width: 1200px) {

    /* 5 cards per row on large screens */
    .products-grid>[class^="col-"],
    .products-grid>[class*=" col-"] {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* Smaller product title on listing cards (approx -2pt) */
.products-grid .product-card .card-title {
    font-size: 12px;
    line-height: 1.3;
    min-height: calc(1.3em * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Icon-only Add to Cart on listing cards */
.products-grid .add-to-cart {
    font-size: 0;
    /* hide text */
    padding: 8px 10px;
}

.products-grid .add-to-cart i {
    font-size: 16px;
    /* visible icon */
    margin-right: 0 !important;
}

/* Smaller View Details text (approx -4pt) */
.products-grid a.btn-outline-primary.btn-sm {
    font-size: 11px;
}