/* ==========================================================================
   NAUTILUS DUBROVNIK - B2B Souvenir Webshop
   Complete Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES & RESET
   -------------------------------------------------------------------------- */

:root {
    /* Colors */
    --color-navy: #1a2332;
    --color-navy-light: #243044;
    --color-navy-dark: #111a26;
    --color-accent: #2d6bcf;
    --color-accent-hover: #245bb3;
    --color-accent-light: #e8f0fc;
    --color-white: #ffffff;
    --color-body-bg: #f5f6f8;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-border: #e0e3e8;
    --color-border-light: #eef0f3;
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-danger: #dc3545;
    --color-info: #17a2b8;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.8125rem;
    --font-size-base: 0.9375rem;
    --font-size-md: 1.0625rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Layout */
    --container-max: 1280px;
    --header-height: 70px;
    --topbar-height: 36px;
    --nav-height: 48px;
    --sidebar-width: 260px;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-round: 50px;
    --transition: 0.2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-body-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent-hover);
}

ul, ol {
    list-style: none;
}

input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}


/* --------------------------------------------------------------------------
   2. TOP BAR
   -------------------------------------------------------------------------- */

.top-bar {
    background-color: var(--color-navy-dark);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-xs);
    height: var(--topbar-height);
    display: flex;
    align-items: center;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.top-bar-left a,
.top-bar-right a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
}

.top-bar-left a:hover,
.top-bar-right a:hover {
    color: var(--color-white);
}

.top-bar-left span::before {
    margin-right: var(--spacing-xs);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.top-bar-right .separator {
    color: rgba(255, 255, 255, 0.3);
}

.discount-badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-round);
    letter-spacing: 0.3px;
}


/* --------------------------------------------------------------------------
   3. HEADER / NAVBAR
   -------------------------------------------------------------------------- */

.site-header {
    background-color: var(--color-navy);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}

/* Logo */
.site-logo {
    flex-shrink: 0;
}

.site-logo a {
    color: var(--color-white);
    font-size: var(--font-size-lg);
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
}

.site-logo a:hover {
    color: var(--color-white);
    opacity: 0.9;
}

.site-logo .logo-sub {
    font-size: var(--font-size-xs);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

/* Header Search */
.header-search {
    flex: 1;
    max-width: 480px;
    margin: 0 var(--spacing-xl);
    position: relative;
}

.header-search form {
    display: flex;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 0.5rem 2.8rem 0.5rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-round);
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    transition: all var(--transition);
    outline: none;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.header-search input:focus {
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.12);
}

.header-search button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-round);
    transition: color var(--transition);
}

.header-search button:hover {
    color: var(--color-white);
}

/* Search Autocomplete */
.search-autocomplete {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 420px;
    overflow-y: auto;
    margin-top: 2px;
}

.search-autocomplete.open {
    display: block;
}

.search-ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--color-text);
    transition: background var(--transition);
    border-bottom: 1px solid var(--color-border-light);
}

.search-ac-item:last-child {
    border-bottom: none;
}

.search-ac-item:hover,
.search-ac-item.ac-active {
    background: var(--color-accent-light);
    color: var(--color-text);
}

.search-ac-item img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    background: var(--color-body-bg);
}

.search-ac-item .ac-noimg {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-body-bg);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.search-ac-info {
    flex: 1;
    min-width: 0;
}

.search-ac-name {
    font-weight: 600;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-ac-ref {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.search-ac-price {
    font-weight: 700;
    font-size: var(--font-size-sm);
    color: var(--color-accent);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Sticky Add to Cart (Mobile) */
.sticky-add-cart {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-navy);
    color: var(--color-white);
    padding: 10px 16px;
    z-index: 900;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.sticky-add-cart.visible {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .sticky-add-cart {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
}

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

.sticky-cart-name {
    font-weight: 600;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-cart-price {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.7);
}

.sticky-cart-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sticky-cart-qty {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
}

.sticky-cart-qty button {
    background: none;
    border: none;
    color: var(--color-white);
    width: 30px;
    height: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticky-cart-qty span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.sticky-cart-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}

.sticky-cart-btn:hover {
    background: var(--color-accent-hover);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.header-actions a {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.header-actions a:hover {
    color: var(--color-white);
}

.header-action-btn {
    position: relative;
}

/* Cart Button with Badge */
.cart-btn {
    position: relative;
    background: var(--color-danger);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-white);
    font-weight: 500;
    transition: background var(--transition);
}

.cart-btn:hover {
    background: #c82333;
    color: var(--color-white);
}

.cart-badge {
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -6px;
    right: -6px;
    line-height: 1;
}


/* --------------------------------------------------------------------------
   4. MAIN NAVIGATION
   -------------------------------------------------------------------------- */

.main-nav {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    z-index: 900;
}

.main-nav .container {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links > li {
    position: relative;
}

.nav-links > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: color var(--transition), background var(--transition);
}

.nav-links > li > a:hover,
.nav-links > li.active > a {
    color: var(--color-accent);
    background-color: var(--color-accent-light);
}

/* Dropdown arrow indicator */
.nav-links > li.has-dropdown > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 3px solid currentColor;
    margin-left: 4px;
    transition: transform var(--transition);
}

/* Dropdown submenu */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-top: 2px solid var(--color-accent);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all 0.2s ease;
    z-index: 950;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Keep dropdown on screen for right-side items */
.nav-links > li:nth-last-child(-n+3) > .nav-dropdown {
    left: auto;
    right: 0;
}

.nav-links > li:hover > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown li a {
    display: block;
    padding: 8px 14px;
    color: var(--color-text);
    font-size: 13px;
    text-decoration: none;
    transition: all var(--transition);
    border-bottom: 1px solid var(--color-border-light);
}

.nav-dropdown li:last-child a {
    border-bottom: none;
}

.nav-dropdown li a:hover {
    background-color: var(--color-accent-light);
    color: var(--color-accent);
    padding-left: 18px;
}


/* --------------------------------------------------------------------------
   5. HAMBURGER MENU (MOBILE)
   -------------------------------------------------------------------------- */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.hamburger span:nth-child(1) {
    margin-bottom: 6px;
}

.hamburger span:nth-child(3) {
    margin-top: 6px;
}

/* Animated X state */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile nav overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-navy);
    z-index: 1050;
    padding: calc(var(--header-height) + var(--spacing-xl)) var(--spacing-lg) var(--spacing-lg);
    overflow-y: auto;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav ul {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav > ul > li > a {
    display: block;
    padding: var(--spacing-md) 0;
    color: var(--color-white);
    font-size: var(--font-size-md);
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav .mobile-dropdown {
    display: none;
    padding-left: var(--spacing-md);
}

.mobile-nav .mobile-dropdown.open {
    display: block;
}

.mobile-nav .mobile-dropdown a {
    display: block;
    padding: var(--spacing-sm) 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


/* --------------------------------------------------------------------------
   6. BREADCRUMB
   -------------------------------------------------------------------------- */

.breadcrumb {
    padding: var(--spacing-md) 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

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

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

.breadcrumb .separator {
    margin: 0 var(--spacing-sm);
    color: var(--color-text-muted);
}

.breadcrumb .current {
    color: var(--color-text);
    font-weight: 500;
}


/* --------------------------------------------------------------------------
   7. PRODUCT GRID
   -------------------------------------------------------------------------- */

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    padding: var(--spacing-md) 0;
}


/* --------------------------------------------------------------------------
   8. PRODUCT CARD
   -------------------------------------------------------------------------- */

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--color-border-light);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(26, 35, 50, 0.12);
    border-color: transparent;
}

/* Card image link */
.product-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f2f5 0%, #e8eaed 100%);
    position: relative;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-card-image img {
    transform: scale(1.08);
}

/* No-image placeholder */
.product-card-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    background: linear-gradient(135deg, #f0f2f5 0%, #e8eaed 100%);
}

/* Card body */
.product-card-body {
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
}

/* Category label */
.product-card-cat {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Title */
.product-card-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    margin: 2px 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

.product-card:hover .product-card-title a {
    color: var(--color-accent);
}

/* Reference */
.product-card-ref {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
}

/* Price */
.product-card-price {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-navy);
    margin-top: auto;
    padding-top: var(--spacing-sm);
    line-height: 1.2;
}

.product-card-price .price-unit {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-text-muted);
}

/* Unit price */
.product-card-unit-price {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 1px;
}

.price-vat-note {
    font-size: 0.6rem;
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* Discount pricing */
.price-original {
    text-decoration: line-through;
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: 0.85em;
}
.price-discounted {
    color: #d32f2f;
    font-weight: 700;
}

/* Checkout payment/invoice options */
.payment-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.payment-option:hover {
    border-color: var(--color-accent);
    background: var(--color-accent-light);
}
.payment-option:has(input:checked) {
    border-color: var(--color-accent);
    background: var(--color-accent-light);
}
.payment-option input[type="radio"] {
    margin-top: 4px;
    accent-color: var(--color-accent);
}
.payment-option-inner {
    flex: 1;
}

/* Footer with button */
.product-card-footer {
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
}

.card-btn-group {
    display: flex;
    gap: 8px;
    width: 100%;
}

.card-btn-group .btn-card-detail {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.8rem;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.card-btn-group .btn-card-detail:hover {
    background: var(--color-accent-hover);
    color: var(--color-white);
}

.btn-card-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.7rem;
    background: var(--color-danger);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-card-cart:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-card-cart.btn-cart-added {
    background: var(--color-success) !important;
}

/* Favorite heart button on card */
.fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    padding: 0;
}

.fav-btn:hover {
    color: #e74c3c;
    transform: scale(1.15);
    background: var(--color-white);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25);
}

.fav-btn.active {
    color: #e74c3c;
    background: var(--color-white);
}

.fav-btn.active svg {
    fill: #e74c3c;
}

/* Heart pop animation */
@keyframes heartPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.35); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.fav-btn.pop {
    animation: heartPop 0.4s ease;
}

/* Larger fav button on product detail */
.fav-btn-detail {
    position: static;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border: 1px solid var(--color-border);
}


/* --------------------------------------------------------------------------
   9. SET BADGE
   -------------------------------------------------------------------------- */

.set-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--color-accent-light);
    color: var(--color-accent);
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.set-badge.set-badge-card {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: var(--color-navy);
    color: var(--color-white);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-round);
    font-size: 0.6875rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

.set-badge.set-badge-inline {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-white);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-round);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Product Ribbons (Novo, U dolasku, Sniženo) */
.product-ribbon {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    line-height: 1;
}

/* Product card - diagonal ribbon over top-right corner */
.product-card-image .product-ribbon {
    position: absolute;
    top: 12px;
    left: -30px;
    z-index: 2;
    padding: 5px 35px;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Product detail page - absolute on image */
.main-image .product-ribbon {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    font-size: 0.75rem;
    padding: 0.35rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.ribbon-novo {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.ribbon-u_dolasku {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.ribbon-snizeno {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* --------------------------------------------------------------------------
   10. BADGES (STOCK, STATUS)
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-round);
    white-space: nowrap;
}

.badge-success {
    background: #e6f4ea;
    color: var(--color-success);
}

.badge-warning {
    background: #fff8e1;
    color: #b8860b;
}

.badge-danger {
    background: #fde8e8;
    color: var(--color-danger);
}

.badge-info {
    background: #e0f7fa;
    color: var(--color-info);
}


/* --------------------------------------------------------------------------
   11. PRODUCT DETAIL PAGE
   -------------------------------------------------------------------------- */

.product-detail {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: var(--spacing-2xl);
    padding: var(--spacing-xl) 0;
    background: var(--color-white);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xl);
}

.product-gallery {
    padding: var(--spacing-lg);
}

.product-gallery-main {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-body-bg);
    margin-bottom: var(--spacing-md);
}

.product-gallery-main img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 500px;
}

.product-gallery-thumbs {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
}

.product-gallery-thumbs img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color var(--transition);
}

.product-gallery-thumbs img:hover,
.product-gallery-thumbs img.active {
    border-color: var(--color-accent);
}

/* Product top bar (breadcrumb + close) */
.product-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.product-topbar .breadcrumb {
    margin: 0;
    padding: 0;
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-back:hover {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: var(--color-white);
    transform: scale(1.05);
}

/* Product Info */
.product-info {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
}

.product-info h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.product-info .product-ref {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
}

.product-info .product-price-main {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: var(--spacing-xs);
}

.product-info .product-price-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
}

/* Set Calculator */
.set-calculator {
    background: var(--color-body-bg);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.set-calculator h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--color-navy);
}

.set-calculator-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.set-calculator-row label {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    min-width: 100px;
}

.set-calculator-row input[type="number"] {
    width: 80px;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
}

.set-calculator-result {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

.set-calculator-result strong {
    font-size: var(--font-size-md);
    color: var(--color-navy);
}

.set-calculator-breakdown {
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.set-calculator-breakdown .total-line {
    font-weight: 700;
    font-size: var(--font-size-base);
    color: var(--color-navy);
}

.product-detail-description {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.7;
}


/* --------------------------------------------------------------------------
   12. CATEGORY PAGE
   -------------------------------------------------------------------------- */

.category-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-lg) 0 var(--spacing-2xl);
}

.category-header {
    margin-bottom: var(--spacing-lg);
}

.category-header h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-navy);
}

.category-header .results-count {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--spacing-xs);
}

/* Sidebar Filters */
.sidebar-filters {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-md));
    max-height: calc(100vh - var(--header-height) - 2rem);
    overflow-y: auto;
}

.filter-group {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-light);
}

.filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-group h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    cursor: pointer;
    padding: var(--spacing-xs) 0;
}

.filter-group label:hover {
    color: var(--color-text);
}

.filter-group input[type="checkbox"] {
    accent-color: var(--color-accent);
    width: 16px;
    height: 16px;
}

.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.sort-bar select {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    background: var(--color-white);
    cursor: pointer;
}


/* --------------------------------------------------------------------------
   13. CATEGORY CARDS (Homepage)
   -------------------------------------------------------------------------- */

.category-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
}

.category-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg);
    border: 1px solid var(--color-border-light);
    position: relative;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(26, 35, 50, 0.12);
    border-color: var(--color-accent);
}

.category-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    margin-bottom: var(--spacing-md);
    transition: all 0.3s ease;
}

.category-card:hover .category-card-icon {
    background: var(--color-accent);
    color: var(--color-white);
    transform: scale(1.1);
}

.category-card-body {
    padding: 0;
}

.category-card-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-navy);
    transition: color var(--transition);
}

.category-card:hover .category-card-title {
    color: var(--color-accent);
}

.category-card-count {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: var(--spacing-xs);
}


/* --------------------------------------------------------------------------
   14. CART PAGE
   -------------------------------------------------------------------------- */

.cart-page {
    padding: var(--spacing-xl) 0 var(--spacing-2xl);
}

.cart-page h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: var(--spacing-lg);
}

.cart-table-wrapper {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    background: var(--color-body-bg);
    padding: var(--spacing-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-navy);
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid var(--color-border);
}

.cart-table td {
    padding: var(--spacing-md);
    font-size: var(--font-size-sm);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.cart-table .cart-product-cell {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    min-width: 250px;
}

.cart-table .cart-product-cell img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-table .cart-product-name {
    font-weight: 600;
    color: var(--color-text);
}

.cart-table .cart-product-ref {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.cart-table .col-set,
.cart-table .col-pieces {
    text-align: center;
    font-weight: 500;
}

.cart-table .col-total {
    font-weight: 700;
    color: var(--color-navy);
    white-space: nowrap;
}

.cart-table .quantity-input {
    width: 60px;
    padding: 0.3rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
}

.cart-table .btn-remove {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--spacing-xs);
    font-size: var(--font-size-md);
    transition: color var(--transition);
}

.cart-table .btn-remove:hover {
    color: var(--color-danger);
}

/* Cart Summary */
.cart-summary {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
}

.cart-summary-box {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    min-width: 320px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

.cart-summary-row.total {
    border-top: 2px solid var(--color-navy);
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-md);
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-navy);
}


/* --------------------------------------------------------------------------
   15. CHECKOUT FORM
   -------------------------------------------------------------------------- */

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl) 0 var(--spacing-2xl);
}

.checkout-form-section {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
}

.checkout-form-section h2 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
}

.checkout-order-summary {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-md));
    height: fit-content;
}

.checkout-order-summary h2 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: var(--spacing-lg);
}


/* --------------------------------------------------------------------------
   16. QUICK ORDER PAGE
   -------------------------------------------------------------------------- */

.quick-order-page {
    padding: var(--spacing-xl) 0 var(--spacing-2xl);
}

.quick-order-page h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: var(--spacing-lg);
}

.quick-order-filters {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.quick-order-filters select,
.quick-order-filters input {
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    background: var(--color-white);
}

.quick-order-table-wrapper {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.quick-order-table {
    width: 100%;
    border-collapse: collapse;
}

.quick-order-table th {
    background: var(--color-body-bg);
    padding: var(--spacing-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-navy);
    text-align: left;
    border-bottom: 2px solid var(--color-border);
}

.quick-order-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.quick-order-table tr:hover {
    background: var(--color-accent-light);
}

.quick-order-table .qty-cell {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.quick-order-table .qty-cell input {
    width: 60px;
    padding: 0.3rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
}


/* --------------------------------------------------------------------------
   17. FORMS
   -------------------------------------------------------------------------- */

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-group label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

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

.form-control {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(45, 107, 207, 0.1);
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.2rem;
}

/* Validation States */
.form-control.is-valid {
    border-color: var(--color-success);
}

.form-control.is-invalid {
    border-color: var(--color-danger);
}

.form-feedback {
    font-size: var(--font-size-xs);
    margin-top: var(--spacing-xs);
}

.form-feedback.valid {
    color: var(--color-success);
}

.form-feedback.invalid {
    color: var(--color-danger);
}


/* --------------------------------------------------------------------------
   18. BUTTONS
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.55rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background-color: var(--color-accent-hover);
    color: var(--color-white);
}

.btn-secondary {
    background-color: var(--color-body-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--color-border-light);
    color: var(--color-text);
}

.btn-cart {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 0.45rem 0.8rem;
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
}

.btn-cart:hover:not(:disabled) {
    background-color: var(--color-accent-hover);
    color: var(--color-white);
}

.btn-quick-order {
    background-color: var(--color-success);
    color: var(--color-white);
    padding: 0.35rem 0.7rem;
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
}

.btn-quick-order:hover:not(:disabled) {
    background-color: #219a38;
    color: var(--color-white);
}

.btn-outline {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-outline:hover:not(:disabled) {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-lg {
    padding: 0.75rem 1.8rem;
    font-size: var(--font-size-base);
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: var(--font-size-xs);
}

.btn-block {
    display: flex;
    width: 100%;
}


/* --------------------------------------------------------------------------
   19. FLASH MESSAGES / ALERTS
   -------------------------------------------------------------------------- */

.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    line-height: 1.5;
}

.alert-success {
    background: #e6f4ea;
    color: #1a7c32;
    border: 1px solid #b7e4c7;
}

.alert-warning {
    background: #fff8e1;
    color: #8a6d00;
    border: 1px solid #ffe082;
}

.alert-danger {
    background: #fde8e8;
    color: #c62828;
    border: 1px solid #f5c6c6;
}

.alert-info {
    background: #e0f7fa;
    color: #00695c;
    border: 1px solid #b2dfdb;
}

.alert .alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: var(--font-size-lg);
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    line-height: 1;
    padding: 0;
}

.alert .alert-close:hover {
    opacity: 1;
}


/* --------------------------------------------------------------------------
   20. SEARCH FORM (standalone)
   -------------------------------------------------------------------------- */

.search-form {
    display: flex;
    max-width: 500px;
}

.search-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 2px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-round) 0 0 var(--radius-round);
    font-size: var(--font-size-sm);
    outline: none;
    transition: border-color var(--transition);
}

.search-form input:focus {
    border-color: var(--color-accent);
}

.search-form button {
    padding: 0.6rem 1.2rem;
    background: var(--color-accent);
    color: var(--color-white);
    border: 2px solid var(--color-accent);
    border-radius: 0 var(--radius-round) var(--radius-round) 0;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition);
}

.search-form button:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
}


/* --------------------------------------------------------------------------
   21. PAGINATION
   -------------------------------------------------------------------------- */

.pagination-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xl) 0;
}

.pagination-nav a,
.pagination-nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--spacing-sm);
    border-radius: var(--radius-round);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.pagination-nav a:hover {
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.pagination-nav .active {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
    pointer-events: none;
}

.pagination-nav .disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination-nav .ellipsis {
    border: none;
    background: none;
    pointer-events: none;
}


/* --------------------------------------------------------------------------
   22. MODAL
   -------------------------------------------------------------------------- */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-navy);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: var(--spacing-xs);
    line-height: 1;
    transition: color var(--transition);
}

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

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}


/* --------------------------------------------------------------------------
   23. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
    background: var(--color-navy);
    color: rgba(255, 255, 255, 0.7);
    margin-top: auto;
    padding: var(--spacing-2xl) 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-2xl);
}

.footer-col h4 {
    color: var(--color-white);
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-accent);
}

.footer-col p {
    font-size: var(--font-size-sm);
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
}

.footer-col ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-sm);
    transition: color var(--transition), padding-left var(--transition);
}

.footer-col ul li a:hover {
    color: var(--color-white);
    padding-left: 4px;
}

.footer-col .contact-line {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-size-xs);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
}

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


/* --------------------------------------------------------------------------
   24. HOMEPAGE SECTIONS
   -------------------------------------------------------------------------- */

.hero-section {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 50%, #2a4a6b 100%);
    color: var(--color-white);
    padding: var(--spacing-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(45, 107, 207, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(45, 107, 207, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.5px;
}

.hero-section p {
    font-size: var(--font-size-md);
    color: rgba(255, 255, 255, 0.75);
    max-width: 560px;
    margin: 0 auto var(--spacing-xl);
    line-height: 1.6;
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--color-accent);
    margin: var(--spacing-sm) auto 0;
    border-radius: 2px;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.feature-card {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    transition: all 0.3s ease;
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    color: var(--color-accent);
}

.feature-card h4 {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}


/* --------------------------------------------------------------------------
   25. LOGIN / REGISTER PAGE
   -------------------------------------------------------------------------- */

.login-page {
    background: var(--color-navy);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(45, 107, 207, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse 60% 60% at 80% 20%, rgba(42, 74, 107, 0.3) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(45, 107, 207, 0.1) 0%, transparent 50%);
    animation: loginAurora 12s ease-in-out infinite alternate;
    z-index: 0;
}

.login-page::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 75% 70%, rgba(45, 107, 207, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse 50% 50% at 30% 30%, rgba(42, 74, 107, 0.25) 0%, transparent 50%);
    animation: loginAurora2 15s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes loginAurora {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    33% {
        transform: translate(5%, -3%) scale(1.05);
    }
    66% {
        transform: translate(-3%, 5%) scale(0.95);
    }
    100% {
        transform: translate(2%, 2%) scale(1.02);
        opacity: 0.8;
    }
}

@keyframes loginAurora2 {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: translate(-4%, 3%) scale(1.08) rotate(2deg);
        opacity: 1;
    }
    100% {
        transform: translate(3%, -4%) scale(0.96) rotate(-1deg);
        opacity: 0.7;
    }
}

/* Login floating particles */
.login-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-particles span {
    position: absolute;
    bottom: -10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    animation: loginFloat linear infinite;
}

.login-particles span:nth-child(1)  { width: 6px;  height: 6px;  left: 5%;  animation-duration: 18s; animation-delay: 0s; }
.login-particles span:nth-child(2)  { width: 4px;  height: 4px;  left: 15%; animation-duration: 22s; animation-delay: 2s; }
.login-particles span:nth-child(3)  { width: 8px;  height: 8px;  left: 25%; animation-duration: 16s; animation-delay: 4s; }
.login-particles span:nth-child(4)  { width: 3px;  height: 3px;  left: 35%; animation-duration: 24s; animation-delay: 1s; }
.login-particles span:nth-child(5)  { width: 5px;  height: 5px;  left: 45%; animation-duration: 20s; animation-delay: 3s; }
.login-particles span:nth-child(6)  { width: 7px;  height: 7px;  left: 55%; animation-duration: 17s; animation-delay: 5s; }
.login-particles span:nth-child(7)  { width: 4px;  height: 4px;  left: 65%; animation-duration: 23s; animation-delay: 0s; }
.login-particles span:nth-child(8)  { width: 6px;  height: 6px;  left: 72%; animation-duration: 19s; animation-delay: 6s; }
.login-particles span:nth-child(9)  { width: 3px;  height: 3px;  left: 80%; animation-duration: 25s; animation-delay: 2s; }
.login-particles span:nth-child(10) { width: 5px;  height: 5px;  left: 88%; animation-duration: 21s; animation-delay: 4s; }
.login-particles span:nth-child(11) { width: 8px;  height: 8px;  left: 10%; animation-duration: 26s; animation-delay: 7s; }
.login-particles span:nth-child(12) { width: 4px;  height: 4px;  left: 40%; animation-duration: 15s; animation-delay: 1s; }
.login-particles span:nth-child(13) { width: 6px;  height: 6px;  left: 60%; animation-duration: 20s; animation-delay: 8s; }
.login-particles span:nth-child(14) { width: 3px;  height: 3px;  left: 92%; animation-duration: 22s; animation-delay: 3s; }
.login-particles span:nth-child(15) { width: 5px;  height: 5px;  left: 50%; animation-duration: 18s; animation-delay: 9s; }

@keyframes loginFloat {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-110vh) translateX(40px) scale(0.5);
        opacity: 0;
    }
}

.login-wrapper {
    width: 100%;
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    padding: var(--spacing-2xl) var(--spacing-xl);
    width: 100%;
    max-width: 420px;
    animation: loginCardEntry 0.6s ease-out;
}

@keyframes loginCardEntry {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.login-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-navy);
    letter-spacing: -0.5px;
    line-height: 1;
}

.login-logo-sub {
    font-size: var(--font-size-xs);
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-top: 2px;
}

.login-tagline {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--spacing-sm);
}

.login-card .form-group {
    margin-bottom: var(--spacing-md);
}

.login-card .form-group label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

.login-card .btn-block {
    margin-top: var(--spacing-lg);
}

.login-footer {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border-light);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.login-footer a {
    font-weight: 600;
}

.login-card .alert {
    margin-bottom: var(--spacing-lg);
}


/* --------------------------------------------------------------------------
   26. UTILITY CLASSES
   -------------------------------------------------------------------------- */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-navy { color: var(--color-navy); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.d-none { display: none; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.gap-3 { gap: var(--spacing-lg); }


/* --------------------------------------------------------------------------
   26. RESPONSIVE - TABLET (max-width: 1024px)
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-detail {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }

    .category-layout {
        grid-template-columns: 220px 1fr;
    }

    .checkout-layout {
        grid-template-columns: 1fr 340px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-search {
        max-width: 320px;
    }
}


/* --------------------------------------------------------------------------
   27. RESPONSIVE - SMALL TABLET (max-width: 768px)
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .top-bar {
        display: none;
    }

    /* Header: show hamburger */
    .hamburger {
        display: flex;
    }

    .header-search {
        display: none;
    }

    .header-actions .action-text {
        display: none;
    }

    .site-header .container {
        gap: var(--spacing-sm);
    }

    /* Main nav: mobile dropdown */
    .main-nav {
        display: none;
        border-bottom: 1px solid var(--color-border);
    }

    .main-nav.open {
        display: block;
    }

    .main-nav .container {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links > li > a {
        padding: 12px 16px;
        font-size: 14px;
        border-bottom: 1px solid var(--color-border-light);
    }

    .nav-links > li.has-dropdown > a::after {
        margin-left: auto;
        border-top: 5px solid currentColor;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
    }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        min-width: auto;
    }

    .nav-links > li.has-dropdown.open > .nav-dropdown {
        max-height: 2000px;
    }

    .nav-dropdown li a {
        padding-left: 32px;
        font-size: 13px;
        background: #f8f9fa;
    }

    /* Product grid: 2 columns */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .category-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Product detail: single column */
    .product-detail {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .product-gallery,
    .product-info {
        padding: var(--spacing-md);
    }

    /* Category: no sidebar */
    .category-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-filters {
        position: static;
        max-height: none;
    }

    /* Checkout: single column */
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-order-summary {
        position: static;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Cart: allow horizontal scroll */
    .cart-table {
        min-width: 700px;
    }

    /* Quick order: allow horizontal scroll */
    .quick-order-table {
        min-width: 600px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }

    /* Hero */
    .hero-section h1 {
        font-size: var(--font-size-xl);
    }

    .hero-section::before,
    .hero-section::after {
        display: none;
    }

    .section-title {
        font-size: var(--font-size-lg);
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .feature-card {
        padding: var(--spacing-lg) var(--spacing-md);
    }
}


/* --------------------------------------------------------------------------
   28. RESPONSIVE - MOBILE (max-width: 480px)
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .product-card {
        border-radius: var(--radius-md);
    }

    .product-card-body {
        padding: var(--spacing-sm);
    }

    .product-card-title {
        font-size: var(--font-size-xs);
    }

    .product-card-price {
        font-size: var(--font-size-base);
    }

    .product-card-footer {
        padding: var(--spacing-xs) var(--spacing-sm) var(--spacing-sm);
    }

    .product-card-cat {
        font-size: 0.6rem;
    }

    .product-card-unit-price {
        font-size: 0.65rem;
    }

    .set-badge.set-badge-card {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
        top: 6px;
        left: 6px;
    }

    .category-cards {
        grid-template-columns: 1fr;
    }

    .sort-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-summary {
        justify-content: stretch;
    }

    .cart-summary-box {
        width: 100%;
        min-width: 0;
    }

    .quick-order-filters {
        flex-direction: column;
    }

    .pagination-nav a,
    .pagination-nav span {
        min-width: 32px;
        height: 32px;
        font-size: var(--font-size-xs);
    }

    .set-calculator-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-info h1 {
        font-size: var(--font-size-lg);
    }
}


/* --------------------------------------------------------------------------
   29. PRINT STYLES
   -------------------------------------------------------------------------- */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .top-bar,
    .site-header,
    .main-nav,
    .hamburger,
    .mobile-nav,
    .sidebar-filters,
    .site-footer,
    .pagination-nav,
    .btn-cart,
    .btn-quick-order,
    .header-search,
    .header-actions,
    .alert,
    .modal-overlay {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    a {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        font-weight: normal;
    }

    .nav-links a[href]::after,
    .footer-col a[href]::after {
        content: none;
    }

    /* Cart print: ensure table is readable */
    .cart-table-wrapper {
        overflow: visible;
    }

    .cart-table {
        min-width: 0;
        border: 1px solid #ccc;
    }

    .cart-table th,
    .cart-table td {
        border: 1px solid #ccc;
        padding: 6px 8px;
    }

    .cart-table .btn-remove {
        display: none;
    }

    .cart-table .quantity-input {
        border: none;
        text-align: left;
    }

    /* Quick order print */
    .quick-order-table-wrapper {
        overflow: visible;
    }

    .quick-order-table {
        min-width: 0;
        border: 1px solid #ccc;
    }

    .quick-order-table th,
    .quick-order-table td {
        border: 1px solid #ccc;
        padding: 6px 8px;
    }

    /* Checkout print */
    .checkout-layout {
        display: block;
    }

    .checkout-order-summary {
        page-break-before: always;
    }

    /* Product detail print */
    .product-detail {
        display: block;
    }

    .product-gallery-thumbs {
        display: none;
    }

    .product-gallery-main img {
        max-height: 300px;
    }

    img {
        max-width: 100% !important;
    }

    /* Page breaks */
    h1, h2, h3 {
        page-break-after: avoid;
    }

    tr {
        page-break-inside: avoid;
    }

    .product-card {
        page-break-inside: avoid;
    }
}
