.breadcrumb a,

.breadcrumb a:active,
.breadcrumb a:hover,
.breadcrumb-home,
.breadcrumb-login {
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
    -moz-text-decoration: none !important;
    -ms-text-decoration: none !important;
    box-shadow: none !important;
    outline: none;
}
/* Modern E-Commerce CSS Template */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --dark: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --header-height: 80px;
    --breadcrumb-height: 56px;
    --footer-height: 72px;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --success: #10b981;
    --info: #4f46e5;
}


body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
}

.page-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden; /* ensure only main scrolls */
}

.page-shell main {
    flex: 1 1 auto;
    /* reserve space for fixed breadcrumb and header; footer sits in flow */
    margin-top: calc(var(--breadcrumb-height) + var(--header-height));
    margin-bottom: 0;
    /* reserve footer space by subtracting its height so it doesn't overlap */
    height: calc(100vh - var(--breadcrumb-height) - var(--header-height) - var(--footer-height));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.page-shell footer {
    margin-top: auto;
}

nav.breadcrumb {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
}

header.site-header {
    position: fixed;
    top: var(--breadcrumb-height);
    left: 0;
    right: 0;
    z-index: 1000;
}

footer.site-footer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 1000;
}

main, .main-content, .products-section {
    /* Remove previous hacks, handled by .page-shell main now */
    box-sizing: border-box;
}


.breadcrumb {
    background-color: var(--white);
    box-shadow: var(--shadow);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--breadcrumb-height);
    padding: 0 24px;
    z-index: 1002;
}

.breadcrumb-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Explicit separator element placed between breadcrumb items */
.breadcrumb-sep {
    color: var(--gray);
    display: inline-block;
    margin: 0 8px;
    font-weight: 600;
}

.breadcrumb-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a,
.breadcrumb a:active,
.breadcrumb a:hover,
.breadcrumb-home,
.breadcrumb-login {
    color: var(--primary) !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: none !important;
    outline: none;
}

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

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

.breadcrumb .error-crumb {
    color: var(--primary);
    font-weight: 600;
}

.breadcrumb-link-right {
    margin-left: auto;
}

/* Ensure Login/Register and Admin links match the Home breadcrumb style */
nav.breadcrumb .breadcrumb-home,
nav.breadcrumb .breadcrumb-category-link,
nav.breadcrumb .breadcrumb-category-fallback,
nav.breadcrumb .breadcrumb-login,
nav.breadcrumb .breadcrumb-admin {
    display: inline-block !important;
    color: var(--primary) !important;
    background: transparent !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}
nav.breadcrumb .breadcrumb-home:hover,
nav.breadcrumb .breadcrumb-category-link:hover,
nav.breadcrumb .breadcrumb-category-fallback:hover,
nav.breadcrumb .breadcrumb-login:hover,
nav.breadcrumb .breadcrumb-admin:hover {
    background: rgba(99,102,241,0.06) !important;
    color: var(--primary-dark) !important;
}

/* Give category pill a little extra horizontal padding so separator doesn't touch text */
.breadcrumb-category-link,
.breadcrumb-category-fallback {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

/* Header */
.site-header,
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    position: fixed; /* keep header visible */
    top: var(--breadcrumb-height);
    left: 0;
    right: 0;
    z-index: 1000;
    gap: 20px;
    height: var(--header-height);
}

.site-header h1,
header h1 {
    text-align: center;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.category-filter {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.category-filter label {
    font-weight: 500;
    color: var(--white);
    font-size: 14px;
}

.category-filter select {
    padding: 10px 40px 10px 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background-color: rgba(255,255,255,0.15);
    color: var(--white);
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="white" d="M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    transition: all 0.3s ease;
    appearance: none;
    min-width: 180px;
}

.category-filter select:hover {
    border-color: rgba(255,255,255,0.6);
    background-color: rgba(255,255,255,0.25);
}

.category-filter select:focus {
    outline: none;
    border-color: var(--white);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.category-filter select option {
    background-color: var(--white);
    color: var(--dark);
}

.back-button {
    background-color: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid rgba(255,255,255,0.3);
}

.back-button:hover {
    background-color: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

.cart-icon {
    background-color: var(--white);
    color: var(--primary);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    margin-left: auto;
}

.cart-icon:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.cart-icon.cart-pop {
    animation: cart-pop 280ms ease-out;
}

@keyframes cart-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.1); box-shadow: var(--shadow-lg); }
    100% { transform: scale(1); }
}

.cart-total-mini {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    display: inline-block;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    box-shadow: var(--shadow);
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, -4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.cart-icon:hover .cart-total-mini {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Cart Overlay - covers elements behind when cart is displayed */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1006;
}

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

/* Custom scrollbars: Chromium browsers and Firefox */
/* Body scrollbar */
html {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(99,102,241,0.9) rgba(0,0,0,0.06); /* thumb track */
}

/* WebKit/Chromium */
html::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
html::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.04);
    border-radius: 10px;
}
html::-webkit-scrollbar-thumb {
    background-color: rgba(99,102,241,0.9);
    border-radius: 10px;
    border: 3px solid rgba(0,0,0,0.06);
}
html::-webkit-scrollbar-thumb:hover {
    background-color: rgba(79,70,229,0.95);
}

/* Thin scrollbar for small scrollable elements (e.g., shopping cart) */
.shopping-cart, .product-grid {
    scrollbar-width: thin;
}
.shopping-cart::-webkit-scrollbar, .product-grid::-webkit-scrollbar {
    width: 8px;
}
.shopping-cart::-webkit-scrollbar-thumb, .product-grid::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.12);
    border-radius: 8px;
}

/* Shopping Cart (Slide-in) */
.shopping-cart {
    position: fixed;
    right: -420px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: -12px 0 30px rgba(0,0,0,0.18);
    padding: 30px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1007;
    overflow-y: auto;
    display: flex;
body.auth-loading .breadcrumb-right > * {
    visibility: hidden;
}
    flex-direction: column;
    border-left: 1px solid rgba(99, 102, 241, 0.15);
}

.shopping-cart.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: none;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.9) 100%);
    z-index: 2;
}

.cart-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
}

.cart-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray);
    padding: 0 5px;
    line-height: 1;
    transition: color 0.2s ease;
}

.cart-close:hover {
    color: var(--dark);
}

.shopping-cart h2 {
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary);
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--dark);
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* Quantity controls */
.cart-item-quantity .cart-qty {
    width: 64px;
    padding: 8px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: border-color 0.2s;
    background: #f9fafb;
}

/* Hide default number input spinners */
input[type=number].cart-qty::-webkit-outer-spin-button,
input[type=number].cart-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number].cart-qty {
    -moz-appearance: textfield;
}

.qty-btn {
    background: #e6eef8;
    border: 1px solid rgba(99,102,241,0.12);
    color: var(--dark);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

.qty-btn:hover {
    background: #d9e8ff;
}

.cart-item-quantity input:focus {
    outline: none;
    border-color: var(--primary);
}

.cart-item-remove {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cart-item-remove:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.cart-total {
    margin: 20px 0 10px;
    font-size: 20px;
    font-weight: 700;
    text-align: right;
    color: var(--dark);
    padding: 12px 14px;
    background: #f1f5f9;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.shopping-cart #cart-items > p {
    text-align: center;
    color: var(--gray);
    padding: 40px 0 20px;
    font-weight: 500;
}

.shopping-cart::-webkit-scrollbar {
    width: 8px;
}

.shopping-cart::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 8px;
}

.shopping-cart::-webkit-scrollbar-track {
    background: transparent;
}

/* Product Grid (Flexbox) */
.products-section {
    padding: 30px;
    max-width: 1300px;
    margin: 0 auto;
}

.error-section {
    display: flex;
    justify-content: center;
}

.error-section .product-card {
    width: 100%;
    max-width: 520px;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0;
    flex: 0 1 calc(33.333% - 25px);
    min-width: 280px;
    max-width: 380px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.error-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0;
    flex: 0 1 calc(33.333% - 25px);
    min-width: 280px;
    max-width: 520px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

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

.product-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: contain;
    cursor: pointer;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 20px;
}

.error-info {
    padding: 20px;
    text-align: center;
}

.product-name {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    display: block;
}

.product-name:hover {
    color: var(--primary);
}

.product-info a {
    text-decoration: none;
}

/* Login/Register page styles re-using product-card visual language */
.login-main {
    color: var(--gray);
    padding: 40px;
    max-width: 720px;
    margin: calc(var(--breadcrumb-height) + var(--header-height) + 20px) auto 40px; /* leave space for fixed header/breadcrumb */
}

.login-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card h2 {
    margin-bottom: 18px;
    font-size: 20px;
    color: var(--dark);
}

.login-card label {
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
    color: var(--gray);
    font-weight: 600;
}

.login-card input[type="text"],
.login-card input[type="password"],
.login-card input[type="email"] {
    overflow-x: auto;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    padding: 14px 14px;
    border: 1px solid #e6eef8;
    border-radius: 8px;
    font-size: 20px;
    background: #fbfdff;
    color: var(--dark);
    box-shadow: none;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    align-items: center;
    justify-content: center;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
}

.form-error {
    margin-top: 12px;
    color: var(--danger);
    font-weight: 600;
}

.product-price {
    font-size: 24px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 16px;
}

/* Buttons */
/* Primary action: use the site's primary color */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.18);
}

/* Secondary / success action: green */
.btn-add-cart,
.btn-success,
.btn-secondary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn-add-cart:hover,
.btn-success:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Danger / destructive action: red */
.btn-danger,
.btn-delete {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn-danger:hover,
.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-secondary:disabled,
.btn-primary:disabled,
.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.cart-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.cart-actions .btn-primary,
.cart-actions .btn-secondary {
    flex: 1;
}

/* Product Detail Page */
.product-detail {
    display: flex;
    gap: 32px;
    padding: 20px;
    max-width: 960px;
    margin: 16px auto;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-height: 0;
    align-items: flex-start;
    opacity: 1;
    transition: opacity 0.2s ease;
}

body.product-loading .product-detail {
    opacity: 0;
    pointer-events: none;
}

.product-images {
    flex: 0 1 450px;
    width: min(100%, 450px);
    min-width: 280px;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius);
    padding: 15px 15px 0;
    min-height: 0;
}

.product-images img {
    width: 100%;
    border-radius: 8px;
}

/* Product Image Slider (SwiperJS) */
.product-swiper {
    flex: 0 0 auto;
    width: 100%;
    height: 280px;
    border-radius: var(--radius);
    overflow: hidden;
}

.product-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 8px;
    padding: 10px;
}

.product-swiper .swiper-slide img {
    max-width: 100%;
    max-height: 240px;
    width: 100%;
    height: 240px;
    object-fit: contain;
}

#product-main-image {
    width: 100%;
    height: 240px;
    object-fit: contain;
}


.product-swiper .swiper-button-next,
.product-swiper .swiper-button-prev {
    color: var(--primary);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    border: 1px solid rgba(99,102,241,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.product-swiper .swiper-button-next::after,
.product-swiper .swiper-button-prev::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    background-repeat: no-repeat;
    background-size: contain;
    line-height: 1;
}

/* Use small inline-SVG chevrons so they look like the sample (soft blue stroke) */
.product-swiper .swiper-button-next::after {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>");
}
.product-swiper .swiper-button-prev::after {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 18 9 12 15 6'/></svg>");
}

.product-swiper .swiper-button-next:hover,
.product-swiper .swiper-button-prev:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: var(--white);
}

.product-swiper .swiper-pagination-bullet {
    background: var(--primary);
    opacity: 0.5;
}

.product-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Thumbnail Swiper */
.thumbnail-swiper {
    flex: 0 0 auto;
    width: 100%;
    height: 60px !important;
    min-height: 60px;
    max-height: 60px;
    display: flex;
    justify-content: center;
    overflow: visible;
    line-height: 0;
    margin: 0;
    padding: 0;
    align-self: stretch;
}

.thumbnail-swiper .swiper-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    height: 60px !important;
    margin: 0;
}

.thumbnail-swiper .swiper-slide {
    flex: 0 0 60px;
    width: 60px !important;
    height: 60px !important;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 0;
}

.thumbnail-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--primary);
}

.thumbnail-swiper .swiper-slide:hover {
    opacity: 0.9;
}

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

.product-details-info {
    flex: 1;
    padding: 20px 0;
    min-height: 0;
}

.product-details-info h2 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--dark);
}

.product-details-info .product-price {
    font-size: 28px;
    margin-bottom: 0x;
}

.product-description {
    margin: 20px 0;
    line-height: 1.6;
    padding: 15px;
}

.product-description h3 {
    margin-bottom: 8px;
    font-size: 16px;
    color: var(--dark);
    font-weight: 600;
}

.product-description p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
}

/* Product Main Image */
.product-main-image {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: var(--radius);
    object-fit: contain;
}

/* Swiper Styles (Extension) */
/* Note: Height is set per-component, not globally */

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

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        position: static;
        transform: none;
        font-size: 18px;
    }
    
    header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .product-grid {
        flex-direction: column;
        padding: 15px;
    }
    
    .product-card {
        flex: 1 1 100%;
    }
    
    .product-detail {
        flex-direction: column;
        margin: 15px;
        padding: 20px;
    }

    .product-images {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 1 1 auto;
    }
    
    .shopping-cart {
        width: 100%;
        right: -100%;
    }
    
    .category-filter {
        order: 3;
        width: 100%;
    }
    
    .category-filter select {
        width: 100%;
    }
}

.site-footer,
footer {
    background: linear-gradient(135deg, var(--dark) 0%, #111827 100%);
    color: var(--white);
    text-align: center;
    padding: 16px 20px;
    position: relative; /* footer participates in layout and sits after main */
    z-index: 1000;
}

footer p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

/* Admin Panel */
.admin-section {
    padding: 30px;
    max-width: 1300px;
    margin: 0 auto;
}

.admin-section h2 {
    margin-bottom: 16px;
    font-size: 22px;
    color: var(--dark);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-card {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-card h3 {
    margin-bottom: 6px;
    color: var(--dark);
}

.form-card label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
}

.form-card input,
.form-card select,
.form-card textarea {
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.form-status {
    min-height: 18px;
    font-size: 13px;
    color: var(--secondary);
}

.form-status.error {
    color: #dc2626;
}

.admin-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
    padding: 6px 0;
}

.admin-image-thumb {
    position: relative;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0;
    background: var(--light-gray);
    cursor: pointer;
    overflow: hidden;
    height: 70px;
}

.admin-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-image-delete {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.7);
    color: var(--white);
    font-size: 14px;
    line-height: 18px;
    text-align: center;
}

.admin-image-thumb.is-primary::after,
.admin-image-thumb.is-selected::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(229, 231, 235, 0.6);
}

.admin-image-thumb.is-selected {
    border-color: var(--primary);
}

.admin-image-empty {
    font-size: 13px;
    color: var(--gray);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    z-index: 2001;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--light-gray);
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--gray);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-content form {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-content label {
    display: block;
    margin-bottom: 6px;
    color: var(--gray);
    font-weight: 600;
}

.modal-content input[type="text"],
.modal-content input[type="password"],
.modal-content input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e6eef8;
    border-radius: 8px;
    font-size: 14px;
    background: #fbfdff;
    color: var(--dark);
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* utility hidden class used instead of inline styles */
.hidden { display: none !important; }