/* ===========================================
   Amour Fine Jewelry - Blue Nile Inspired Design
   Color Palette from Logo
   =========================================== */

:root {
    --primary-dark: #1a1a1a;        /* Black text */
    --primary-red: #8B2332;         /* Deep burgundy/red from heart */
    --primary-blush: #f5e6e8;       /* Soft pink background */
    --white: #ffffff;
    --text-light: #666666;
    --border: #e0d0d0;              /* Slightly pink-tinted border */
    --bg: #fafafa;
    --card-bg: #fff;

    /* Legacy variable mappings */
    --primary: var(--primary-dark);
    --secondary: var(--text-light);
    --accent: var(--primary-red);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Reset some Bootstrap overrides */
a {
    color: inherit;
}

a:hover {
    color: inherit;
}

button {
    font-family: inherit;
}

/* Typography */
html, body {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--white);
    color: var(--primary-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    overflow-x: hidden;
}

.page {
    width: 100%;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 500;
}

/* ===========================================
   Promo Banner
   =========================================== */

.promo-banner {
    background: var(--primary-red);
    color: var(--white);
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    position: relative;
}

.promo-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.promo-banner a {
    color: var(--white);
    text-decoration: underline;
    font-weight: 500;
}

.promo-banner a:hover {
    opacity: 0.9;
}

.promo-banner-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.promo-banner-close:hover {
    opacity: 1;
}

/* ===========================================
   Main Header
   =========================================== */

.main-header {
    background: var(--primary-blush);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1100;
    width: 100%;
    overflow: visible;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .header-content {
        padding: 1rem 2rem;
        gap: 2rem;
    }
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 50px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-grow: 1;
    justify-content: center;
}

.main-nav a,
.main-nav .nav-link {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.main-nav a:hover,
.main-nav .nav-link:hover,
.main-nav a.active,
.main-nav .nav-link.active {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
}

/* Shop Dropdown Menu */
.nav-dropdown {
    position: relative;
    z-index: 1200;
}

.nav-dropdown > .nav-link::after {
    content: '\25BE';
    margin-left: 0.35rem;
    font-size: 0.7rem;
    opacity: 0.7;
}

.shop-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 2px solid #333333;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    min-width: 220px;
    max-height: 400px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 9999 !important;
    border-radius: 4px;
    overflow: visible;
    pointer-events: none;
}

.nav-dropdown:hover .shop-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.shop-dropdown-menu .dropdown-item {
    display: block !important;
    padding: 0.875rem 1.5rem !important;
    color: #000000 !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    transition: all 0.2s !important;
    border-bottom: 1px solid #eee !important;
    background: #ffffff !important;
    line-height: 1.5 !important;
    width: 100% !important;
}

.shop-dropdown-menu .dropdown-item:first-child {
    padding-top: 1rem !important;
}

.shop-dropdown-menu .dropdown-item:last-child {
    padding-bottom: 1rem !important;
}

.shop-dropdown-menu .dropdown-item:hover {
    background: var(--primary-blush) !important;
    color: var(--primary-red) !important;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.header-icons a,
.header-icons button,
.header-icons .icon-btn {
    color: var(--primary-dark);
    font-size: 1.1rem;
    transition: color 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
}

.header-icons a:hover,
.header-icons button:hover,
.header-icons .icon-btn:hover {
    color: var(--primary-red);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--primary-dark);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.logout-btn:hover {
    color: var(--primary-red);
}

.language-switcher {
    display: flex;
    align-items: center;
}

.language-flag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    border: 1px solid currentColor;
    border-radius: 3px;
    transition: all 0.2s;
}

.icon-btn:hover .language-flag {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

/* Cart Icon */
.cart-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.cart-icon-link:hover {
    color: var(--primary-red);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary-red);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

/* Legacy nav-links support */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-red);
}

/* ===========================================
   Hero Section
   =========================================== */

.hero {
    background: var(--primary-blush);
    padding: 4rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .hero {
        padding: 5rem 2rem;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245,230,232,0.9) 0%, rgba(245,230,232,0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero .promo-text {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin: 0 0 1.5rem;
    color: var(--primary-dark);
    line-height: 1.2;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===========================================
   Buttons
   =========================================== */

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-red);
    color: var(--white);
    border: 2px solid var(--primary-red);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #6d1a27;
    border-color: #6d1a27;
    color: var(--white);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* ===========================================
   Container
   =========================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* ===========================================
   Main Content
   =========================================== */

main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
    width: 100%;
    overflow-x: hidden;
}

main.container {
    padding: 2rem 1rem;
}

h1 {
    font-weight: 400;
    font-size: 2rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: center;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    font-size: 1rem;
    color: var(--text-light);
}

/* ===========================================
   Category Filter (Horizontal Links Style)
   =========================================== */

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.filter-btn {
    padding: 0.5rem 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-dark);
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.filter-btn:hover {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
}

.filter-btn.active {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
    background: transparent;
}

/* ===========================================
   Items Grid
   =========================================== */

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
}

@media (max-width: 640px) {
    .items-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ===========================================
   Item Card
   =========================================== */

.item-card {
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.item-card:hover {
    transform: translateY(-4px);
}

.item-card:hover .item-image img {
    transform: scale(1.02);
}

.item-card.sold {
    opacity: 0.85;
}

.item-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--primary-blush);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sold-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-dark);
    color: var(--white);
    padding: 0.35rem 1rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.sold-badge.large {
    font-size: 0.8rem;
    padding: 0.5rem 1.25rem;
}

.item-info {
    padding: 1.5rem 0.5rem;
    text-align: center;
}

.item-info h3 {
    margin: 0 0 0.5rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.item-info .metal {
    color: var(--text-light);
    font-size: 0.8rem;
    margin: 0 0 0.75rem;
    letter-spacing: 0.02em;
}

.item-info .price {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: var(--primary-red);
}

/* ===========================================
   Item Detail
   =========================================== */

.item-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 768px) {
    .item-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.item-detail-image {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.item-detail-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 8px;
}

.item-detail-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .item-detail-image {
        max-width: 100%;
    }
}

.item-detail-info h1 {
    font-family: 'Playfair Display', Georgia, serif;
    margin-top: 0;
    font-size: 2rem;
}

.item-detail-info .description {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--primary-blush);
}

.spec .label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.spec .value {
    font-size: 1rem;
    font-weight: 500;
}

.item-detail-info .price {
    font-size: 2rem;
    font-weight: 500;
    color: var(--primary-red);
    margin-bottom: 1.5rem;
}

.buy-button {
    display: block;
    width: 100%;
    padding: 1.25rem 2rem;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
}

.buy-button:hover:not(:disabled) {
    background: #6d1a27;
}

.buy-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sold-notice {
    padding: 1.5rem;
    background: var(--primary-blush);
    text-align: center;
    color: var(--text-light);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-red);
}

/* ===========================================
   Footer
   =========================================== */

.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 3rem 1rem 2rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .footer {
        padding: 4rem 2rem 2rem;
    }
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    width: 100%;
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-section h4 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--white);
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 1.5rem;
    letter-spacing: 0.05em;
}

.footer-section p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary-red);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section li a {
    font-size: 0.9rem;
}

.footer-bottom {
    max-width: 1400px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-social a {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--primary-red);
}

/* Legacy footer support */
.footer .container {
    text-align: center;
}

.footer-brand {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: var(--primary-red);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.footer-address,
.footer-phone,
.footer-email {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.footer-email a {
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}

.footer-email a:hover {
    color: var(--primary-red);
}

.footer-links {
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-red);
}

/* ===========================================
   Forms
   =========================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.image-preview {
    margin-top: 1rem;
    max-width: 300px;
}

.image-preview img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid var(--border);
    border-radius: 4px;
}

.image-preview img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.image-preview::after {
    content: "Click to view full size";
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.submit-button {
    padding: 1rem 2rem;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.submit-button:hover:not(:disabled) {
    background: #6d1a27;
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.success-message {
    padding: 1rem;
    background: #d4edda;
    color: #155724;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.error-message {
    padding: 1rem;
    background: #f8d7da;
    color: #721c24;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.quick-upload {
    max-width: 500px;
}

/* ===========================================
   Admin Styles
   =========================================== */

.admin-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.admin-nav a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.admin-nav a.active {
    color: var(--primary-dark);
    border-bottom: 2px solid var(--primary-red);
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
}

.admin-wrapper table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background: var(--white);
}

.admin-wrapper th,
.admin-wrapper td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-wrapper th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    background: var(--primary-blush);
}

.admin-wrapper tbody tr:hover {
    background: var(--primary-blush);
}

.admin-wrapper .action-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 0.25rem;
    transition: all 0.2s;
    text-decoration: none;
}

.admin-wrapper .action-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.admin-wrapper .action-btn.edit:hover,
.admin-wrapper .action-btn.save:hover {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.admin-wrapper .action-btn.delete:hover {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.admin-wrapper .action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-wrapper .form-group {
    margin-bottom: 1.25rem;
}

.admin-wrapper .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-wrapper .form-group input,
.admin-wrapper .form-group select,
.admin-wrapper .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
    background: var(--white);
    color: var(--primary-dark);
    transition: border-color 0.2s;
}

.admin-wrapper .form-group input:focus,
.admin-wrapper .form-group select:focus,
.admin-wrapper .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(139, 35, 50, 0.1);
}

.admin-wrapper .submit-button {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.admin-wrapper .submit-button:hover:not(:disabled) {
    background: #6d1a27;
}

.admin-wrapper .success-message,
.admin-wrapper .error-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.admin-wrapper .success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.admin-wrapper .error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.admin-wrapper h1 {
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.admin-wrapper h2 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.admin-wrapper .hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.admin-wrapper code {
    background: var(--primary-blush);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    color: var(--primary-red);
}

/* ===========================================
   Status & Role Badges
   =========================================== */

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 3px;
}

.status-badge.active,
.status-badge.published,
.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive,
.status-badge.draft,
.status-badge.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.confirmed {
    background: #cce5ff;
    color: #004085;
}

.role-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 3px;
}

.role-badge.admin {
    background: #fff3cd;
    color: #856404;
}

.role-badge.user {
    background: #d4edda;
    color: #155724;
}

/* ===========================================
   Utilities
   =========================================== */

.loading, .empty, .error {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

/* ===========================================
   Blazor UI
   =========================================== */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: var(--primary-red);
    padding: 1rem;
    color: var(--white);
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* ===========================================
   Responsive
   =========================================== */

/* Ensure body never creates horizontal scroll */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Ensure all containers fit within viewport */
* {
    max-width: 100%;
}

/* Images responsive by default */
img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 992px) {
    .header-content {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 1.5rem;
        margin-top: 1rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    /* Admin adjustments */
    .admin-main-inner {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0.75rem 1rem;
    }

    .logo img {
        height: 40px;
    }

    .main-nav {
        gap: 1rem;
    }

    .main-nav a,
    .main-nav .nav-link {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    /* Hide dropdown on mobile - just use Shop link */
    .nav-dropdown > .nav-link::after {
        display: none;
    }

    .shop-dropdown-menu {
        display: none !important;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .category-filter {
        gap: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    /* Item detail responsive */
    .item-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Admin adjustments */
    .admin-main-inner {
        padding: 1rem;
    }

    .table-wrapper {
        margin: 0;
        padding: 0;
    }

    /* Form adjustments */
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    main.container {
        padding: 1.5rem 0.75rem;
    }

    main {
        padding: 1.5rem 0;
    }

    .logo img {
        height: 35px;
    }

    .header-icons {
        gap: 1rem;
    }

    .header-icons a,
    .header-icons button {
        font-size: 1rem;
    }

    .promo-banner {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .promo-banner-close {
        right: 0.5rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero .promo-text {
        font-size: 0.7rem;
    }

    .items-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .specs {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.5rem;
    }

    /* Admin mobile adjustments */
    .admin-main-inner {
        padding: 0.75rem;
    }

    .admin-wrapper table {
        min-width: 600px;
    }

    /* Buttons full width on mobile */
    .action-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.25rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 2rem;
        font-size: 0.7rem;
    }

    .main-nav a,
    .main-nav .nav-link {
        font-size: 0.65rem;
    }
}
