/* ==========================================================================
   Luxury Design System - บ้านมีดครูอ๋อ
   Dark & Light Mode Support
   ========================================================================== */

/* --- CSS Variables --- */

/* Dark Mode (Default) */
:root,
:root[data-theme="dark"] {
    /* Primary Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #141414;
    --bg-elevated: #1f1f1f;

    /* Gold Palette */
    --gold-primary: #d4a853;
    --gold-secondary: #f5d78e;
    --gold-dark: #b8943e;
    --gold-gradient: linear-gradient(135deg, #d4a853, #f5d78e, #d4a853);
    --gold-shimmer: linear-gradient(90deg, #d4a853, #f5d78e, #d4a853, #f5d78e);

    /* Text Colors */
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #6a6a6a;

    /* Borders & Shadows */
    --border-color: #2a2a2a;
    --border-gold: rgba(212, 168, 83, 0.3);
    --shadow-gold: 0 0 30px rgba(212, 168, 83, 0.2);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.6);

    /* Header Background */
    --header-bg: rgba(10, 10, 10, 0.95);
    --header-bg-scrolled: rgba(10, 10, 10, 0.98);

    /* Loader Background */
    --loader-bg: #0a0a0a;

    /* Typography */
    --font-family: 'Prompt', sans-serif;
    --header-height: 80px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-theme: 0.4s ease;
}

/* Light Mode */
:root[data-theme="light"] {
    /* Primary Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-card: #ffffff;
    --bg-elevated: #fafafa;

    /* Gold Palette (Slightly adjusted for light mode) */
    --gold-primary: #c49642;
    --gold-secondary: #d4a853;
    --gold-dark: #a67c2f;
    --gold-gradient: linear-gradient(135deg, #c49642, #d4a853, #c49642);
    --gold-shimmer: linear-gradient(90deg, #c49642, #d4a853, #c49642, #d4a853);

    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #5a5a5a;
    --text-muted: #8a8a8a;

    /* Borders & Shadows */
    --border-color: #e0e0e0;
    --border-gold: rgba(196, 150, 66, 0.3);
    --shadow-gold: 0 0 30px rgba(196, 150, 66, 0.15);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.12);

    /* Header Background */
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-bg-scrolled: rgba(255, 255, 255, 0.98);

    /* Loader Background */
    --loader-bg: #ffffff;
}

/* --- Keyframe Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(212, 168, 83, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(212, 168, 83, 0.5);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: rgba(212, 168, 83, 0.3);
    }

    50% {
        border-color: rgba(212, 168, 83, 0.6);
    }
}

/* --- Reset & Base Styles --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: var(--header-height);
    overflow-x: hidden;
    transition: background-color var(--transition-theme), color var(--transition-theme);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    transition: background-color var(--transition-theme);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 6px;
    transition: background-color var(--transition-theme);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--gold-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
}

.main-content,
.login-page-wrapper,
.dashboard-wrapper {
    flex-grow: 1;
}

/* ==========================================================================
   Header - Glassmorphism Style
   ========================================================================== */

.main-header {
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-gold);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-smooth),
        background-color var(--transition-theme),
        border-color var(--transition-theme);
}

.main-header.scrolled {
    background: var(--header-bg-scrolled);
    box-shadow: var(--shadow-gold);
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-smooth), color var(--transition-theme);
}

.logo span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo:hover {
    transform: scale(1.02);
}

/* Navigation */
.main-nav {
    display: none;
}

@media (min-width: 768px) {
    .main-nav {
        display: block;
    }
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: color var(--transition-fast);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gold-gradient);
    transition: all var(--transition-smooth);
    transform: translateX(-50%);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--gold-primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-btn {
    font-size: 1.3rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
}

.action-btn:hover {
    color: var(--gold-primary);
    transform: scale(1.1);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gold-gradient);
    background-size: 200% auto;
    color: var(--bg-primary);
    border: none;
    font-weight: 600;
}

.btn-primary:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    color: var(--bg-primary);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
}

.btn-secondary:hover {
    background: rgba(212, 168, 83, 0.1);
    border-color: var(--gold-secondary);
    color: var(--gold-secondary);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* ==========================================================================
   Mobile Menu
   ========================================================================== */

.mobile-menu-toggle {
    display: block;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: 10px;
}

.mobile-menu-toggle:hover {
    color: var(--gold-primary);
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    padding: 20px;
    z-index: 999;
    border-bottom: 1px solid var(--border-gold);
    animation: slideDown 0.3s ease-out;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    padding: 16px 20px;
    font-size: 1.1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover {
    color: var(--gold-primary);
    background: rgba(212, 168, 83, 0.05);
    padding-left: 30px;
}

.mobile-menu hr {
    border: none;
    border-top: 1px solid var(--border-gold);
    margin: 10px 0;
}

/* ==========================================================================
   Hero Slider
   ========================================================================== */

.slider-container {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    position: relative;
    margin-bottom: 3rem;
    border-radius: 16px;
    background-color: var(--bg-secondary);
}

.slider-container .slide {
    display: none;
    animation: fadeIn 1s ease-in-out;
}

.slider-container .slide.active {
    display: block;
}

.slider-container img {
    width: 100%;
    height: 600px;
    object-fit: cover;
}

.slide-no-image {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    color: var(--text-primary);
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem;
    position: relative;
}

.slide-no-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(212, 168, 83, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.slide-no-image h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

.slide-no-image p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 600px;
    color: var(--text-secondary);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.slide-no-image .btn-slide {
    display: inline-block;
    padding: 14px 36px;
    background: var(--gold-gradient);
    background-size: 200% auto;
    color: var(--bg-primary);
    border-radius: 8px;
    font-weight: 600;
    transition: all var(--transition-smooth);
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.slide-no-image .btn-slide:hover {
    background-position: right center;
    transform: scale(1.05);
    box-shadow: var(--shadow-gold);
}

/* ==========================================================================
   Section Titles
   ========================================================================== */

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--gold-gradient);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ==========================================================================
   Product Grid & Cards
   ========================================================================== */

.featured-products {
    padding: 60px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-smooth);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: border-color var(--transition-smooth);
    pointer-events: none;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-gold);
}

.product-card:hover::before {
    border-color: var(--gold-primary);
}

.product-image-link {
    display: block;
    aspect-ratio: 1 / 1;
    background: var(--bg-secondary);
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover img {
    transform: scale(1.08);
}

.product-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    flex-grow: 1;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-name a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.product-name a:hover {
    color: var(--gold-primary);
}

.product-serial {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--gold-primary);
    margin-bottom: 16px;
    opacity: 0.8;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 16px;
}

.btn-view {
    background: transparent;
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--transition-smooth);
    text-decoration: none;
    display: inline-block;
    margin-top: auto;
}

.btn-view:hover {
    background: var(--gold-gradient);
    border-color: transparent;
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* ==========================================================================
   Product Detail Page
   ========================================================================== */

.product-detail-page {
    padding: 40px 0;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

@media (min-width: 992px) {
    .product-detail-layout {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
}

/* Image Gallery */
.image-gallery-column .main-image {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.image-gallery-column .main-image img {
    width: 100%;
    cursor: zoom-in;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.thumbnail-item {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
    transition: all var(--transition-fast);
    opacity: 0.6;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: var(--gold-primary);
    opacity: 1;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info Column */
.info-column .product-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-serial-detail {
    font-family: 'Courier New', monospace;
    color: var(--gold-primary);
    background: rgba(212, 168, 83, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 30px;
    border: 1px solid var(--border-gold);
}

.details-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.details-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.description-section h3 {
    color: var(--gold-primary);
    margin-bottom: 15px;
}

.description-section p {
    line-height: 1.8;
    color: var(--text-secondary);
}

.action-buttons {
    margin-top: 40px;
}

.action-buttons .btn {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
}

/* ==========================================================================
   Theme Toggle Button
   ========================================================================== */

.theme-toggle {
    background: transparent;
    border: 2px solid var(--border-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-smooth);
    color: var(--text-secondary);
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-gold);
}

.theme-toggle:active {
    transform: scale(0.95) rotate(15deg);
}

.theme-toggle i {
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.theme-toggle .fa-sun {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.theme-toggle .fa-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Light mode toggle states */
:root[data-theme="light"] .theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

:root[data-theme="light"] .theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

@media (max-width: 768px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-gold);
    padding: 60px 0 40px;
    margin-top: auto;
}

.main-footer .container {
    text-align: center;
}

.main-footer p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--gold-primary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all var(--transition-smooth);
}

.social-links a:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

/* ==========================================================================
   Alerts & Messages
   ========================================================================== */

.alert {
    padding: 16px 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInUp 0.3s ease-out;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #4caf50;
}

.alert-danger,
.alert-error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #f44336;
}

.alert-warning {
    background: rgba(212, 168, 83, 0.15);
    border: 1px solid var(--border-gold);
    color: var(--gold-primary);
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* ==========================================================================
   Animations Utility Classes
   ========================================================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-gold {
    color: var(--gold-primary);
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablets & Below (1024px) */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding-left: 24px;
        padding-right: 24px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 24px;
    }

    .main-nav ul {
        gap: 24px;
    }
}

/* Mobile & Tablets (768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .slider-container,
    .slider-container img,
    .slide-no-image {
        height: 400px;
        border-radius: 16px;
    }

    .slide-no-image h2 {
        font-size: 2rem;
    }

    .slide-no-image p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .product-info {
        padding: 16px;
    }

    .product-name {
        font-size: 1rem;
        min-height: 45px;
    }

    .featured-products {
        padding: 40px 0;
    }

    .logo {
        font-size: 1.4rem;
    }

    .header-actions {
        gap: 12px;
    }

    .action-btn {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    /* Footer adjustments */
    .main-footer {
        padding: 40px 0 30px;
    }

    .footer-links {
        gap: 20px;
        flex-direction: column;
    }

    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* Small Mobile Devices (576px) */
@media (max-width: 576px) {
    :root {
        --header-height: 65px;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .slider-container,
    .slider-container img,
    .slide-no-image {
        height: 300px;
        border-radius: 12px;
    }

    .slide-no-image h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .slide-no-image p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .slide-no-image .btn-slide {
        padding: 12px 28px;
        font-size: 0.95rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo i {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 0.9rem;
        min-height: 40px;
    }

    .btn-view {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .featured-products {
        padding: 30px 0;
    }

    .section-footer {
        margin-top: 30px;
    }

    .btn-view-all {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    /* Thumbnail gallery for product details */
    .thumbnail-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .product-detail-layout {
        padding: 24px;
        gap: 24px;
    }

    .info-column .product-title {
        font-size: 1.6rem;
    }
}

/* Extra Small Devices (400px) */
@media (max-width: 400px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .slider-container,
    .slider-container img,
    .slide-no-image {
        height: 250px;
    }

    .slide-no-image h2 {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .header-actions .btn-primary {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Landscape Mobile Devices */
@media (max-height: 500px) and (orientation: landscape) {

    .slider-container,
    .slider-container img,
    .slide-no-image {
        height: 350px;
    }

    .main-header {
        height: 60px;
    }

    body {
        padding-top: 60px;
    }
}

/* ==========================================================================
   PhotoSwipe Fixes
   ========================================================================== */

.pswp {
    display: none;
}

/* ==========================================================================
   Loading & Preloader
   ========================================================================== */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}