/* Base Reset - SALA VERMELHA Theme (Red/Black) */
html {
    scroll-behavior: smooth;
    min-height: 100%;
    margin: 0;
}

body {
    background-color: #000000;
    overflow-y: hidden; /* Prevent body scroll */
    background-size: 50px 50px;
    color: #e0e0e0;
    font-family: 'Verdana', 'Geneva', sans-serif;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    height: 100vh; /* Must be fixed height for flex full screen layout */
    display: flex;
    flex-direction: column;
}

/* Keyframes for fluidity */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: translate(-50%, -40%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Links - Red Accent */
a { color: #ff3333; text-decoration: none; border-bottom: 1px dotted #800000; transition: color 0.2s; }
a:visited { color: #cc6666; }
a:hover { color: #fff; border-bottom: 1px solid #ff0000; text-decoration: none; text-shadow: 0 0 5px #ff0000; }
a:active { color: #ff0000; }

.fixed-header-container {
    flex: 0 0 auto;
    width: 100%;
    z-index: 1000;
    background-color: #000;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.2);
}

/* Scrollbar Styling for Webkit (Chrome, Safari, newer Edge) */
.main-container::-webkit-scrollbar {
    width: 10px;
}

.main-container::-webkit-scrollbar-track {
    background: #110000;
}

.main-container::-webkit-scrollbar-thumb {
    background: #880000;
    border: 1px solid #ff0000;
}

.main-container::-webkit-scrollbar-thumb:hover {
    background: #aa0000;
}

/* Adjust header wrapper to account for scrollbar width if needed, 
   or ensure main-container spacing matches visually. 
   Since scrollbar is inside main-container, its content width is slightly less.
   We can try to add a scrollbar gutter or padding adjustment. */
   
.header-content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 25px; /* 15px padding + ~10px for potential scrollbar adjustment */
    box-sizing: border-box;
}

.main-container {
    flex: 1 1 auto; /* Grow and shrink */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    
    background-color: #000000;
    padding: 15px;
    box-sizing: border-box;
    overflow: hidden; /* Important: prevents double scrollbars */
    overflow-y: auto;
    min-height: 0; /* Crucial for flex child scroll */
    
    animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.scrollable-content {
    /* Alias if needed, but main-container handles the scroll */
}

/* Ensure children don't shrink unexpectedly */
.recent-carousel-container, .timeline-track {
    flex: 0 0 auto;
}

/* Main Layout */
.content-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    /* Ensure content wrapper takes available height in main-container */
    height: calc(100% - 20px); 
}
.top-header {
    border-bottom: 2px solid #ff0000;
    background: #000000;
    padding: 15px 0; /* Vertical padding only, wrapper has horizontal */
    width: 100%;
    /* padding-bottom: 15px; implied by padding shorthand */
}

.logo h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 50px;
    margin: 0;
    letter-spacing: -2px;
    text-transform: uppercase;
    text-shadow: 0 0 8px #ff0000;
    color: #ff0000;
}

.red-text { color: #ff0000; } 
.blue-text { color: #ffffff; text-shadow: none; } 
.green-text { color: #ee1212; font-family: 'Courier New', sans-serif; font-size: 24px; font-style: normal; font-weight: bold; }

/* SVG Icons */
.header-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: text-bottom;
    fill: currentColor;
    margin-right: 4px;
}

.welcome-bar .header-icon {
    width: 14px;
    height: 14px;
    margin-right: 3px;
    position: relative;
    top: -1px;
}

.welcome-bar {
    font-size: 16px;
    background-color: #2b0000;
    border-top: 1px solid #550000;
    border-bottom: 2px solid #ff0000;
    /* margin-bottom: 15px; */ /* Remove margin so it stacks cleanly */
    color: #ffcccc;
    width: 100%;
}

.top-ticker {
    background-color: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border-bottom: 1px solid #0f0;
    overflow: hidden;
    white-space: nowrap;
}

.top-ticker-track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: topTickerScroll var(--ticker-duration, 24s) linear infinite;
}

.top-ticker-text {
    flex: 0 0 auto;
    padding-right: 42px;
}

@keyframes topTickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-1 * var(--ticker-shift, 50%))); }
}

/* Action Bar - Dark Red */
.action-bar {
    display: flex;
    background-color: #220000;
    margin-bottom: 20px;
    border: 2px outset #500;
}

.action-box {
    flex: 1;
    padding: 15px;
    text-align: center;
    transition: background 0.2s;
    cursor: pointer;
}

.action-box:hover {
    background-color: #400000;
}

.border-left-right {
    border-left: 2px groove #440000;
    border-right: 2px groove #440000;
}

.yellow-text { color: #ff3333; margin: 0 0 5px 0; font-size: 14px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.white-text { color: #aa8888; margin: 0; font-size: 11px; } 

/* Main Layout */
.content-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    /* Ensure content wrapper takes available height in main-container */
    height: calc(100% - 20px); 
}

.left-column { 
    font-size: 10px;
    width: 20%; 
    height: fit-content;
    /* position: sticky; */ /* Sticky might fight with overflow parent */
    overflow-y: hidden;
    max-height: 80%;
    border-bottom: 1px solid #ff3333;
}

.middle-column { 
    width: 56%; 
    /* Occupy full height of parent, simpler than calc calc */
    height: 100%;
    max-height: none; 
    overflow-y: auto;
    padding-bottom: 80px; /* Space for fixed footer */
    
    /* Custom scrollbar matching theme */
    scrollbar-width: thin;
    scrollbar-color: #550000 #110000;
}

.middle-column::-webkit-scrollbar {
    width: 8px;
}
.middle-column::-webkit-scrollbar-track {
    background: #110000;
}
.middle-column::-webkit-scrollbar-thumb {
    background: #550000;
    border-radius: 4px;
}
.middle-column::-webkit-scrollbar-thumb:hover {
    background: #880000;
}
.right-column { 
    width: 20%; 
    height: fit-content;
    position: sticky;
    top: 15px; /* Adjusted since header is not 'overlaying' but stacked flex item */
    align-self: flex-start;
}

/* Section Headers - Red Variants */
.section-header {
    color: #fff;
    font-weight: bold;
    font-size: 20px;
    padding: 6px 10px;
    border: 1px solid #500;
    text-shadow: 1px 1px 0 #000;
    margin-bottom: 0;
    letter-spacing: 1px;
}

.blue-bg { background: linear-gradient(to bottom, #880000, #440000); border-color: #400; } 
.green-bg { background: linear-gradient(to bottom, #330000, #000000); border-color: #300; border-top: 1px solid #600; }
.yellow-bg { background-color: #110505; padding: 15px; border: 1px solid #440000; border-top: none; margin-bottom: 20px; box-shadow: inset 0 0 10px #220000;}
.white-bg { background-color: #160808; padding: 15px; overflow:hidden;border: 1px solid #440000; margin-bottom: 20px; box-shadow: inset 0 0 10px #220000; }
.categories-box {
    max-height: 300px; /* Limit height */
    overflow-y: auto; /* Enable scroll */
}

/* Custom scrollbar for categories box */
.categories-box::-webkit-scrollbar {
    width: 6px;
}
.categories-box::-webkit-scrollbar-track {
    background: #110000;
}
.categories-box::-webkit-scrollbar-thumb {
    background: #550000;
    border-radius: 3px;
}
.categories-box::-webkit-scrollbar-thumb:hover {
    background: #880000;
}

.blue-text { color: red !important; }

/* Product Grid Layout */
.products-box.yellow-bg {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    
}

/* Products & Image Squares */
.product-item {
    background: #1e0505;
    border: 1px solid #440000;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px #ff000044;
    border-color: #ff3333;
    z-index: 2;
}

.product-item h4 { margin: 0 0 8px 0; font-size: 14px; line-height: 1.2; height: 34px; overflow: hidden; }
.product-item h4 a { color: #ffcccc; text-decoration: none; border: none; }
.product-item h4 a:hover { color: #fff; text-shadow: 0 0 5px #f00; }
.product-item p { margin: 0 0 10px 0; font-size: 12px; color: #cc9999; }

.image-squares {
    display: flex;
    gap: 5px;
    margin-top: auto;
}

.img-sq {
    flex: 1;
    height: 40px;
    background-color: #220000;
    border: 1px solid #550000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #cc8888;
    cursor: pointer;
    transition: 0.3s ease;
}

.img-sq:hover {
    background-color: #660000;
    color: #fff;
    border-color: #ff5555;
    transform: scale(1.05);
}

/* Active buttons */
.img-sq.active {
    background-color: #ff0000 !important;
    color: #fff !important;
    border-color: #fff !important;
    font-weight: bold;
}

/* Fix product image sizing */
.product-img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.add-to-cart-ajax, .action-btn {
    display: inline-block;
    padding: 4px 8px;
    background: linear-gradient(to bottom, #880000, #440000);
    border: 1px outset #aa3333;
    color: #fff !important;
    font-size: 11px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s ease;
}

.add-to-cart-ajax:hover, .action-btn:hover {
    background: linear-gradient(to bottom, #aa0000, #660000);
    border-color: #ff5555;
    box-shadow: 0 0 8px #ff000066;
    transform: translateY(-1px);
}

.add-to-cart-ajax:active, .action-btn:active {
    border: 1px inset #aa3333;
    background: #440000;
    transform: translateY(1px);
}

/* Cart Table Styling */
.cart-table {
    width: 100%;
    margin-top: 10px;
    border-spacing: 0;
    border: 1px solid #550000;
}

.cart-table th {
    background: #440000;
    color: #fff;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #880000;
    font-size: 12px;
    text-transform: uppercase;
}

.cart-table td {
    background: #1a0505;
    padding: 10px;
    border-bottom: 1px solid #330000;
    color: #ddd;
}

.cart-table tr:last-child td { border-bottom: none; }
.cart-table tr:hover td { background: #2a0a0a; }

.cart-total {
    background: #1a0000;
    padding: 15px;
    text-align: right;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    color: #ff3333;
    border: 1px solid #550000;
    border-top: none;
    margin-bottom: 20px;
}

/* Right Column Specifics */
.notable-box h4 { margin: 0 0 5px 0; font-size: 14px; }
.notable-box p { font-family: "Times New Roman", Times, serif; font-size: 13px; margin-top: 0; color: #999; }

/* Form Elements */
input[type="text"], input[type="password"], input[type="email"] {
    background-color: #333;
    border: 1px solid #555;
    color: #ddd;
    padding: 5px;
    width: 60%;
    margin-bottom: 10px;
}

button {
    background-color: #444;
    color: #ddd;
    border: 2px outset #555;
    cursor: pointer;
    padding: 2px 10px;
}

button:active {
    border: 2px inset #555;
}

/* Auth Pages */
.auth-box {
    width: 300px;
    margin: 50px auto;
    background-color: #222;
    border: 1px solid #444;
    padding: 20px;
    text-align: center;
}

.auth-box h2 {
    color: #ffff00;
    margin-top: 0;
}

.auth-links {
    margin-top: 15px;
    font-size: 12px;
}

/* Alert Notifications (Flash Messages) - Fixed Top Right */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 11000;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.8);
    font-weight: bold;
    animation: slideInRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-color: #111;
    color: #fff;
    border: 1px solid #333;
    border-left-width: 5px;
    max-width: 350px;
    font-size: 14px;
}

.alert-success {
    background-color: #001100;
    color: #ccffcc;
    border-left-color: #00cc00;
    box-shadow: 0 0 10px rgba(0,255,0,0.2);
}

.alert-error, .alert-danger {
    background-color: #220000;
    color: #ffcccc;
    border-left-color: #ff0000;
    box-shadow: 0 0 10px rgba(255,0,0,0.2);
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Retro Alert Box (Modal) - Red Theme */
.retro-alert-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    background-color: #000;
    border: 2px solid #800000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4), 0 0 0 2000px rgba(0,0,0,0.7); /* Modal Overlay */
    z-index: 10000;
    font-family: 'Verdana', sans-serif;
    color: #e0e0e0;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.retro-alert-header {
    background: #800000;
    color: #fff;
    padding: 8px 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.retro-alert-close {
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 18px;
    padding: 0;
    margin: 0;
    background-color: transparent;
    color: #fff;
    border: none;
    cursor: pointer;
}
.retro-alert-close:hover { text-shadow: 0 0 5px #fff; }

.retro-alert-content {
    padding: 25px;
    text-align: center;
    font-size: 15px;
}

.retro-alert-ok {
    margin-top: 20px;
    padding: 8px 30px;
    background-color: #200;
    color: #f00;
    border: 1px solid #f00;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.2s;
}

.retro-alert-ok:hover {
    background-color: #f00;
    color: #000;
    box-shadow: 0 0 10px #f00;
}


/* Helper for JS functionality */
.img-sq.active {
    border: 2px solid #ffff00; /* Highlight active view */
    background-color: #333;
}


/* Product Specifications Revamp */
.product-detail-container {
    display: flex;
    gap: 30px;
    background: #0a0000;
    padding: 20px;
    border: 1px solid #400;
    box-shadow: inset 0 0 20px #200;
}

.retro-viewport {
    width: 300px;
    height: 300px;
    background-color: #000;
    border: 4px bevel #300;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px #f00;
}

.retro-viewport::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.product-info-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-family: 'Impact', sans-serif;
    font-size: 32px;
    font-weight: normal;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    text-shadow: 2px 2px 0 #800;
    border-bottom: 2px solid #500;
    padding-bottom: 10px;
}

/* Tabs */
.specs-tabs {
    display: flex;
    margin-top: 15px;
    border-bottom: 1px solid #500;
}

.tab-btn {
    background: #1a0505;
    border: 1px solid #500;
    border-bottom: none;
    color: #884444;
    padding: 8px 20px;
    cursor: pointer;
    margin-right: 5px;
    font-family: 'Verdana', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #330000;
    color: #ffcccc;
}

.tab-btn.active {
    background: #440000;
    color: #fff;
    border-color: #f00;
    box-shadow: 0 -2px 5px #ff000044;
}

.tab-content {
    display: none;
    padding: 15px;
    background: #110505;
    border: 1px solid #500;
    border-top: none;
    min-height: 120px;
    color: #ccc;
    font-size: 12px;
    line-height: 1.6;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Purchase Area */
.purchase-area {
    margin-top: auto;
    background: #1a0000;
    padding: 15px;
    border: 1px dashed #500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-tag {
    font-size: 24px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 0 5px #0f0;
}

.qty-control {
    display: flex;
    align-items: center;
    background: #000;
    border: 1px solid #400;
}

.qty-btn {
    background: #300;
    color: #fff;
    border: none;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-weight: bold;
}
.qty-btn:hover { background: #500; }

.qty-input {
    width: 40px;
    background: #000;
    color: #fff;
    border: none;
    text-align: center;
    font-family: 'Courier New';
}

.big-buy-btn {
    background: linear-gradient(to bottom, #f00, #900);
    color: #fff;
    border: 2px outset #f55;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 10px #f00;
    text-shadow: 1px 1px 0 #000;
}

.big-buy-btn:hover {
    background: linear-gradient(to bottom, #ff3333, #aa0000);
    box-shadow: 0 0 20px #f00;
}

.big-buy-btn:active {
    border: 2px inset #f55;
    transform: translateY(1px);
}

/* Logo styles */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo img {
    height: 150px;
    /* border: 2px solid #800000; */
    /* box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); */
    transition: transform 0.3s ease;
}

/* --- Profile Page Styling (Red Theme) --- */
.profile-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.profile-sidebar {
    width: 260px;
    background-color: #050505;
    border: 2px solid #440000;
    box-shadow: 0 0 10px rgba(100, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.avatar-box {
    background: linear-gradient(135deg, #220000, #440000);
    padding: 25px 20px;
    text-align: center;
    border-bottom: 2px solid #800000;
    box-shadow: inset 0 0 30px #000;
}

.avatar-placeholder {
    width: 90px;
    height: 90px;
    background-color: #000;
    margin: 0 auto 15px;
    border: 2px solid #ff0000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff0000;
    font-size: 30px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 15px #f00;
    border-radius: 5px;
    text-shadow: 0 0 5px #f00;
}

.avatar-box h3 {
    margin: 0;
    color: #ff0000;
    font-size: 18px;
    font-family: 'Verdana', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px #500;
}

.avatar-box p {
    font-size: 11px;
    margin-top: 5px;
    color: #888;
    font-family: monospace;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #000;
}

.sidebar-menu li {
    border-bottom: 1px solid #330000;
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: #aa5555;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.2s;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu a:hover {
    background-color: #1a0000;
    color: #ffcccc;
    border-left-color: #ff0000;
    box-shadow: inset 5px 0 10px rgba(255,0,0,0.1);
}

.profile-content {
    flex: 1;
    background-color: #0a0a0a;
    border: 1px solid #440000;
    color: #ccc;
    padding: 25px;
    box-shadow: inset 0 0 50px #000;
    min-height: 400px;
}

/* Tabs inside Profile */
.tab-header {
    border-bottom: 2px solid #500;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-end;
}

.tab-title {
    background: #440000;
    padding: 10px 20px;
    border: 1px solid #600;
    border-bottom: none;
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -2px 5px rgba(255,0,0,0.2);
}

/* Profile Tables */
.order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid #440000;
    margin-bottom: 20px;
    background: #000;
}

.order-table th {
    background-color: #220000;
    color: #ffaaaa;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #550000;
    text-transform: uppercase;
    font-size: 12px;
}

.order-table td {
    padding: 12px;
    border-bottom: 1px solid #220000;
    color: #ddd;
}

.order-table tr:hover {
    background-color: #1a0505;
}

.order-table tr:hover td {
    color: #fff;
    text-shadow: 0 0 2px #f00;
}


/* RESPONSIVE DESIGN */
@media screen and (max-width: 768px) {
    body {
        margin: 0;
        padding: 0; /* Remove padding */
        overflow-y: auto !important; /* Allow body scroll on mobile */
        height: auto !important; /* Allow body to grow */
        display: block; /* Reset flex display if causing issues, or keep flex-col but allow height */
    }

    .main-container {
        width: 100%;
        max-width: none;
        padding: 10px;
        box-sizing: border-box;
        border: none;
        box-shadow: none;
        overflow: visible !important; /* Allow content to flow */
        height: auto !important; /* Let it grow */
    }

    /* Header Adjustments for Mobile */
    .fixed-header-container {
        /* Let flexbox handle positioning (it stays at top because body is flex-col) */
        position: static; 
        box-shadow: 0 4px 6px -1px rgba(255, 0, 0, 0.3); /* Stronger shadow on mobile */
    }
    
    /* Make header more compact */
    .top-header {
        flex-direction: column; /* Stacked: Logo, then Nav */
        padding: 5px 0; /* Reduce padding */
        gap: 5px;
    }

    .logo {
        flex-direction: row; /* Keep logo horizontal to save vertical space? */
        align-items: center;
        gap: 10px;
        margin-bottom: 5px;
    }

    .logo img {
        height: 40px; /* Much smaller logo */
    }

    .logo h1 {
        font-size: 20px; /* Smaller title */
        white-space: nowrap;
    }

    .top-links {
        margin-top: 0;
        font-size: 11px;
    }
    
    /* Reset padding wrapper */
    .header-content-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Adjust main container to account for fixed header height? 
       Actually main-container is flex-grow, so it sits below fixed-header naturally in flex-col body. 
       No padding-top needed on main-container if body is flex-col. */

    /* Layout Columns */
    .content-wrapper {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: 10px;
    }

    /* Mobile: Order 1 for Middle (Content), Order 2 for Left (Search/Cat), Order 3 for Right */
    /* Wait, usually user wants search on top? 
       The user said "Category and search areas are too large".
       If I move them to bottom, they are not "too large" initially.
       But standard UX is Search on top.
       Let's keep Search on top but make it compact.
    */
    
    .left-column {
        width: 100%;
        position: static;
        height: auto;
        border-bottom: none; /* remove separator */
    }

    .left-column .section-header {
        font-size: 14px; /* Smaller header */
        padding: 4px 8px;
        cursor: pointer; /* Hint valid for JS toggle if added later */
    }

    /* Search Box Compact */
    .left-column .search-box {
        padding: 8px; /* Reduce padding */
        margin-bottom: 10px;
        display: flex;
        justify-content: center;
    }

    .left-column .search-box form {
        display: flex;
        width: 100%;
        gap: 5px;
    }

    .left-column .search-box input {
        flex: 1; /* Input takes available space */
        width: auto; /* Override fixed width if any */
        padding: 8px;
        font-size: 14px; /* Readable text */
    }

    .left-column .search-box button {
        padding: 8px 15px;
        font-size: 14px;
    }

    /* Categories Box Compact / Collapsible visual */
    .left-column .categories-box {
        max-height: 200px; /* Reduced height on mobile */
        margin-bottom: 15px;
        padding: 8px;
        overflow-y: scroll; /* Force scroll */
    }

    .category-columns {
        flex-direction: column; /* Stack the two ULs */
        gap: 0;
    }

    .category-columns ul {
        display: flex;
        flex-wrap: wrap; /* Grid-like display for links */
        padding: 0;
        margin: 0;
        gap: 5px;
        width: 100%;
    }

    .category-columns li {
        width: calc(50% - 5px); /* 2 cols strictly */
        border: 1px solid #330000;
        background: #1a0505;
        padding: 8px;
        margin-bottom: 5px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: center;
    }
    
    .category-columns li a {
        font-size: 11px; /* Smaller font */
        font-weight: bold;
    }

    .category-columns li span.sub-text {
        font-size: 9px;
        display: none; /* Hide descriptions to save space */
    }
    
    .category-columns li br {
        display: none; /* Remove line break */
    }

    .right-column, .middle-column {
        width: 100%;
        position: static;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    /* Re-order for mobile: Search/Categories (Left) first is OK, 
       but maybe we want Products (Middle) first? 
       Let's keep source order for now: Left -> Middle -> Right.
    */

    /* Welcome Bar */
    .welcome-bar {
        font-size: 12px; /* Smaller font for mobile */
        padding: 5px;
    }

    .welcome-bar .header-content-wrapper {
        flex-direction: column;
        gap: 5px;
        text-align: center;
        padding-top: 2px !important;
        padding-bottom: 2px !important;
    }

    .right-align {
        text-align: center;
        width: 100%;
        margin-top: 2px;
    }

    /* Products & Image Squares */
    .product-img-container {
        height: 200px !important; /* Force a reasonable height on mobile */
    }

    /* Product Grid */
    .products-box.yellow-bg {
        padding: 10px;
        /* Mobile grid: 1 col for very small, 2 cols for > 350px */
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px; /* Increase gap slightly for touch */
    }

    .img-sq {
        height: 35px; /* Slightly smaller squares on mobile if needed, or keep same */
        padding: 5px;
    }

    .add-to-cart-ajax, .action-btn {
        padding: 10px 15px; /* Bigger touch target */
        margin-top: 8px;
        width: 100%; /* Full width button on mobile */
        box-sizing: border-box;
        text-align: center;
        font-size: 12px;
    }

    /* Override middle column specifically */
    .middle-column { 
        width: 100%; 
        max-height: none !important; /* Remove internal scroll/limit on mobile */
        height: auto;
        overflow: visible !important;
        scrollbar-width: auto; /* Reset scrollbar settings */
        padding-bottom: 0; /* Let main-container handle padding */
    }

    /* Allow product title to wrap on mobile */
    .product-item h4 {
        height: auto;
        max-height: none; /* Let titles expand naturally on mobile */
        font-size: 14px; /* Ensure readability */
        margin-bottom: 5px;
    }

    /* Search/Categories Optimization */
    .categories-box {
        max-height: 200px; /* Shorter scroll area for categories on mobile */
        margin-bottom: 20px;
    }

    /* Product Details */
    .product-detail-container {
        flex-direction: column;
        padding: 10px;
        gap: 15px;
    }

    .retro-viewport {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        margin: 0 auto;
    }

    .product-image-large {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .purchase-area {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    /* Profile Page */
    .profile-container {
        flex-direction: column;
    }

    .profile-sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .profile-content {
        padding: 10px;
    }

    /* Admin Panel Responsive */
    .admin-layout {
        flex-direction: column; 
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 2px solid #f00;
        padding: 15px;
        box-sizing: border-box;
    }

    .main-content {
        padding: 15px;
        overflow-x: hidden; /* Prevent horizontal scroll on main content */
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }

    /* Auth Boxes */
    .auth-box {
        width: 90%;
        margin: 30px auto;
        padding: 15px;
    }
    
    input[type="text"], input[type="password"], input[type="email"] {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Cart */
    .cart-table th, .cart-table td {
        padding: 5px;
        font-size: 11px;
    }
    
    .action-bar {
        flex-wrap: wrap;
    }
    
    .action-box {
        flex: 1 1 50%; /* 2 per row */
        box-sizing: border-box;
        border: 1px solid #440000;
    }

    /* Mobile Footer Adjustments */
    .main-container {
        padding-bottom: 220px; /* Increase padding for mobile where footer wraps */
    }

    .site-footer {
        padding: 5px 0;
    }

    .footer-seals {
        gap: 8px;
    }
}

/* Added for Product Page Viewport */
.retro-viewport {
    background-color: #000;
    border: 2px inset #555;
    padding: 10px;
    margin-bottom: 10px;
    height: 300px; /* Fixed height to match intention */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ascii-art {
    font-family: "Courier New", monospace;
    color: #00ff00; /* Bright Green */
    font-weight: bold;
    font-size: 14px;
    line-height: 1.2;
    white-space: pre;
    text-align: center;
    margin: 0;
    text-shadow: 0 0 5px #00ff00;
}


.sticky-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #000; /* Match body/header bg */
    width: 100%;
    /* Ensure it stays on top and spans full width of container */
    margin-top: -15px; /* Counteract container padding if needed */
    padding-top: 15px; /* Add padding back */
    margin-left: -15px;
    padding-left: 15px;
    margin-right: -15px;
    padding-right: 15px;
    width: calc(100% + 30px);
}

/* Order Invoice Styling */

.invoice-box {
    background-color: #0d0d0d;
    color: #ccc;
    padding: 30px;
    border: 3px double #aa0000;
    font-family: 'Courier New', Courier, monospace;
    max-width: 800px;
    margin: 20px auto;
    box-shadow: 0 0 20px rgba(128, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.invoice-box::before {
    content: "SALA VERMELHA";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 80px;
    color: rgba(255, 0, 0, 0.05);
    font-weight: bold;
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
}

.invoice-header {
    border-bottom: 2px dashed #aa0000;
    padding-bottom: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.invoice-header .inv-title {
    color: #ff3333;
    font-size: 24px;
    margin: 0 0 5px 0;
    letter-spacing: 2px;
    text-shadow: 0 0 5px #ff0000;
}

.invoice-items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.invoice-items th {
    text-align: left;
    border-bottom: 2px solid #550000;
    padding: 10px;
    color: #f00;
    text-transform: uppercase;
    font-size: 13px;
}

.invoice-items td {
    padding: 12px 10px;
    border-bottom: 1px dotted #330000;
    color: #ddd;
    font-size: 13px;
}

.invoice-items tr:last-child td {
    border-bottom: none;
}

.total-line {
    border-top: 2px solid #aa0000;
    padding-top: 20px;
    text-align: right;
    font-size: 20px;
    font-weight: bold;
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
    z-index: 1;
    position: relative;
}

.print-btn {
    background: transparent;
    color: #888;
    border: 1px solid #444;
    padding: 5px 15px;
    margin-top: 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    text-transform: uppercase;
}

.print-btn:hover {
    color: #fff;
    border-color: #fff;
    text-shadow: 0 0 5px #fff;
}

/* --- Cart Page Styles --- */
.cart-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 10px; 
}

.cart-table th, .cart-table td { 
    border: 1px solid #555; 
    padding: 8px; 
    text-align: left; 
    color: #ccc; 
}

.cart-table th { 
    background-color: #333; 
    font-weight: bold;
}

.cart-total { 
    text-align: right; 
    margin-top: 15px; 
    font-size: 18px; 
    font-weight: bold; 
    color: #ffff00; 
}

/* --- Product Detail Page Styles --- */
.product-detail-layout { 
    display: flex; 
    gap: 20px; 
    flex-wrap: wrap; /* Ensure responsible wrapping */
}

.product-image-container { 
    width: 300px; 
    height: 300px; 
    background-color: #111; 
    border: 2px solid #555; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #555;
    position: relative;
    overflow: hidden;
}

.product-info-column {
    flex: 1;
    min-width: 300px;
}

.review-box { 
    background-color: #222; 
    border: 1px dotted #555; 
    padding: 10px; 
    margin-bottom: 10px; 
}

.star-rating { 
    color: #ffff00; 
    display: inline-block;
    margin-left: 5px;
}

/* Responsive Overrides for Product Detail */
@media screen and (max-width: 768px) {
    .product-detail-layout {
        flex-direction: column;
    }
    
    .product-image-container {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }
.bold { font-weight: bold; }
.red { color: #ff0000; }
.white { color: #ffffff; }

/* --- Cart Specific overrides --- */
.cart-empty-message {
    padding: 40px;
    text-align: center;
}
.cart-empty-title {
    color: #555;
    margin-bottom: 10px;
}

/* Category List Styles */
.category-columns {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.category-columns ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.category-columns li {
    margin-bottom: 12px;
    border-bottom: 1px dashed #330000;
    padding-bottom: 5px;
}

.category-columns li:last-child {
    border-bottom: none;
}

/* Active Category Highlight */
.active-cat {
    color: #ffff00 !important; /* Yellow */
    font-weight: bold;
    text-shadow: 0 0 5px #ff0000;
    border-bottom: 1px solid #ffff00 !important;
    padding-left: 5px;
    border-left: 3px solid #ffff00;
    background-color: #220000;
    display: inline-block;
    padding-right: 5px;
}

.sub-text {
    font-size: 0.85em;
    color: #995555;
    margin-top: 2px;
    display: block;
    font-style: italic;
}

/* Timeline Styles - Minimalist/Retro/Old */
.timeline-track {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align left like a path */
    padding: 10px;
    margin-bottom: 20px;
    background-color: #000;
    border: 1px solid #333;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    flex-wrap: wrap; /* Allow wrapping by default */
}

/* Connectors (The Lines) */
.timeline-track .timeline-connector {
    width: 30px; /* Fixed width */
    height: 1px;
    background-color: #333; /* Dark line */
    margin: 0 10px;
    position: relative;
    flex-grow: 0;
}

.timeline-track .timeline-connector.filled {
    background-color: #800000; /* Dark Red */
    box-shadow: none; /* No glow */
}

/* Timeline Items */
.timeline-item {
    text-align: center;
    position: relative;
    min-width: auto; /* Allow shrink */
}

.timeline-link {
    display: flex;
    align-items: center;
    gap: 8px; /* Space between dot and text */
    text-decoration: none;
    color: #555; /* Dim color for inactive */
    border: none !important;
    flex-direction: row; /* Horizontal alignment */
}

.timeline-link:hover {
    color: #999;
}

/* Retro Square Dots */
.timeline-dot {
    width: 6px;
    height: 6px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 0; /* Square */
    margin-bottom: 0; /* Inline */
    box-shadow: none;
}

/* Active State */
.timeline-item.active .timeline-dot {
    background-color: #ff0000;
    border-color: #ff0000;
    box-shadow: none;
    transform: none;
}

.timeline-item.active .timeline-label {
    color: #ff0000;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: underline;
}

/* Completed State */
.timeline-item.completed .timeline-dot {
    background-color: #800000;
    border-color: #800000;
}

.timeline-item.completed .timeline-label {
    color: #aa3333;
}

.timeline-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
    max-width: none;
    white-space: nowrap;
    overflow: visible;
}

/* Responsive adjust */
@media screen and (max-width: 600px) {
    .timeline-track {
        flex-wrap: wrap;
    }
    .timeline-connector {
        display: none; /* Hide connectors on mobile if wrapping */
    }
    .timeline-item {
        margin-right: 10px;
    }
    .timeline-item::after {
        content: ">";
        color: #333;
        margin-left: 10px;
    }
    .timeline-item:last-child::after {
        content: "";
    }
}

/* Carousel Styles */
.recent-carousel-container {
    margin-bottom: 20px;
    background: #0d0d0d;
    border: 1px solid #440000;
    padding: 10px;
    position: relative;
    box-shadow: inset 0 0 20px #1a0000;
    width: fit-content; /* Dynamic width based on content */
    max-width: 100%;    /* But don't overflow screen */
    margin-left: auto;  /* Center it */
    margin-right: auto;
    display: block;
}

.carousel-header {
    background: linear-gradient(to right, #220000, #440000);
    color: #fff;
    padding: 5px 10px;
    font-size: 11px;
    text-transform: uppercase;
    border: 1px solid #550000;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    min-width: 300px; /* Ensure header isn't too tiny if few items */
}

.carousel-viewport {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Keyframes for sliding entrance of items if needed */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.carousel-item {
    min-width: 160px;
    max-width: 160px;
    margin-right: 15px;
    background: #1a0505;
    border: 1px solid #330000;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    white-space: normal;
    box-sizing: border-box;
    transition: all 0.3s ease; /* Hover animation */
}

.carousel-item:hover {
    border-color: #ff0000;
    box-shadow: 0 0 15px #ff0000;
    transform: translateY(-5px) scale(1.02);
    z-index: 10;
    background: #2a0000;
}

.carousel-controls button {
    background: #330000;
    color: #fff;
    border: 1px solid #550000;
    cursor: pointer;
    padding: 2px 8px;
    font-family: inherit;
    font-size: 10px;
}

.carousel-controls button:hover {
    background: #550000;
    color: #ffff00;
}

/* Footer Structure - Fixed Bottom */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: auto;
    text-align: center;
    padding: 10px 0;
    color: #999;
    background: #000000;
    border-top: 2px solid #800000;
    font-family: 'Verdana', sans-serif;
    font-size: 10px;
   
}

/* Adjust Main Container to prevent content being hidden behind footer */
.main-container {
    padding-bottom: 140px; /* Default for desktop */
}

/* Retro Seals Container */
.footer-seals {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 0 10px;
}

/* Individual Seal Badge (88x31 style adaptation - Classic "Split" Look) */
.seal-badge {
    display: flex;
    width: 88px;
    height: 31px;
    background-color: #000;
    border: 1px solid #fff;
    font-family: 'Pixel', 'Courier New', monospace;
    font-size: 9px;
    font-weight: normal;
    text-transform: uppercase;
    cursor: help;
    box-shadow: none;
    padding: 0;
    position: relative;
    image-rendering: pixelated;
}

.seal-badge:hover {
    transform: none;
    box-shadow: 0 0 5px #fff;
}

.seal-badge .seal-icon {
    display: none; /* Hide emoji icons for true retro text look, or adapt */
}

/* Fake the "split" button look with CSS gradients/borders */
.bitcoin-seal {
    background: linear-gradient(90deg, #f7931a 25px, #000 25px);
    border-color: #f7931a;
    color: #f7931a;
}
.bitcoin-seal::before { content: "BTC"; position: absolute; left: 2px; top: 9px; color: #000; font-weight: bold; font-size: 8px; }
.bitcoin-seal .seal-text { margin-left: 28px; line-height: 29px; color: #f7931a; }

.tor-seal {
    background: linear-gradient(90deg, #7d4698 25px, #000 25px);
    border-color: #7d4698;
    color: #7d4698;
}
.tor-seal::before { content: "TOR"; position: absolute; left: 2px; top: 9px; color: #fff; font-weight: bold; font-size: 8px; }
.tor-seal .seal-text { margin-left: 28px; line-height: 29px; color: #7d4698; }

.nologs-seal {
    background: linear-gradient(90deg, #ff0000 25px, #000 25px);
    border-color: #ff0000;
    color: #ff0000;
}
.nologs-seal::before { content: "NO"; position: absolute; left: 5px; top: 9px; color: #fff; font-weight: bold; font-size: 9px; }
.nologs-seal .seal-text { margin-left: 30px; line-height: 29px; color: #ff0000; }

.pgp-seal {
    background: linear-gradient(90deg, #4a90e2 25px, #000 25px);
    border-color: #4a90e2;
    color: #4a90e2;
}
.pgp-seal::before { content: "PGP"; position: absolute; left: 3px; top: 9px; color: #fff; font-weight: bold; font-size: 8px; }
.pgp-seal .seal-text { margin-left: 28px; line-height: 29px; color: #4a90e2; }

.escrow-seal {
    background: linear-gradient(90deg, #50c878 25px, #000 25px);
    border-color: #50c878;
    color: #50c878;
}
.escrow-seal::before { content: "SAFE"; position: absolute; left: 1px; top: 9px; color: #000; font-weight: bold; font-size: 7px; }
.escrow-seal .seal-text { margin-left: 28px; line-height: 29px; color: #50c878; }


/* Responsive adjustments for seals */
@media screen and (max-width: 480px) {
    .footer-seals {
        gap: 10px;
    }
    .seal-badge {
        font-size: 9px;
        min-width: 70px;
        padding: 2px 5px;
    }
}

/* --- RETRO EFFECTS --- */

/* Blinking Text */
.blink {
    animation: blinker 1s step-end infinite;
}
@keyframes blinker {
    50% { opacity: 0; }
}

/* Green Selection */
::selection {
    background: #00ff00;
    color: #000;
}
::-moz-selection {
    background: #00ff00;
    color: #000;
}

/* Retro Cursor */
body {
    cursor: crosshair; /* Or url('cursor.cur'), auto */
}
a, button, .btn {
    cursor: pointer; /* Or hand */
}

/* Scrollbar (Chrome/Edge/Safari) */
::-webkit-scrollbar {
    width: 12px;
    background: #111;
    border-left: 1px solid #333;
}
::-webkit-scrollbar-thumb {
    background: #500;
    border: 1px outset #a00;
}
::-webkit-scrollbar-thumb:hover {
    background: #800;
}
::-webkit-scrollbar-button {
    background: #222;
    border: 1px outset #444;
    height: 12px;
}

/* CRT Scanline Effect (Subtle) */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 9999;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* Em telas menores, desliga o overlay CRT para reduzir custo de render. */
@media screen and (max-width: 768px), (prefers-reduced-motion: reduce) {
    body::before {
        display: none;
    }
}

/* --- RESPONSIVE IMPROVEMENTS --- */

@media screen and (max-width: 768px) {
    /* Global Container */
    .main-container {
        padding: 10px;
        padding-bottom: 150px; /* Space for footer */
    }

    /* Header */
    .header-content-wrapper {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }
    .top-links {
        margin-top: 10px;
        align-items: center !important;
    }
    
    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 10px;
    }
    
    .product-item img {
        height: 140px; /* Smaller images */
    }

    /* Product Detail */
    .product-detail-layout {
        flex-direction: column !important;
        align-items: center;
    }
    
    .product-image-container {
        width: 100% !important;
        height: auto !important;
        max-width: 300px;
        margin-bottom: 20px;
    }
    
    /* Tables */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Footer */
    .site-footer {
        position: relative; /* Unstick footer on mobile if content is long */
    }
    .main-container {
        padding-bottom: 20px;
    }
}

@media screen and (max-width: 480px) {
    h1 { font-size: 24px; }
    .product-title { font-size: 22px; }
    
    /* Admin Mobile Adjustments */
    .admin-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 2px solid #f00;
        padding: 10px !important;
    }
    .main-content {
        padding: 10px !important;
    }
    
    /* Hide some admin columns on mobile */
    th:nth-child(2), td:nth-child(2), /* Image */
    th:nth-child(6), td:nth-child(6) /* Buttons/Extra */
    {
        /* display: none;  -- Optional, better to scroll */
    }
    
    .stat-grid {
        grid-template-columns: 1fr 1fr; 
    }
}

/* --- Profile Tabs & Dashboard --- */
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.sidebar-menu a.active { 
    box-shadow: inset 5px 0 10px rgba(255,0,0,0.2); 
}

/* Dashboard Cards */
.dash-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

.dash-card { 
    background: #050505; 
    border: 1px solid #330000; 
    padding: 20px; 
    border-radius: 4px; 
    text-align: center; 
    position: relative; 
    overflow: hidden; 
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.dash-card::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 3px; 
    background: linear-gradient(90deg, #500, #f00, #500); 
}

.dash-value { 
    font-size: 28px; 
    color: #fff; 
    font-weight: bold; 
    margin: 15px 0; 
    text-shadow: 0 0 10px #f00; 
    font-family: 'Courier New', monospace; 
}

.dash-label { 
    font-size: 11px; 
    color: #888; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
}

/* Status Badges */
.status-badge { 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-size: 10px; 
    font-weight: bold; 
    text-transform: uppercase; 
    border: 1px solid transparent; 
    display: inline-block;
    min-width: 80px;
    text-align: center;
}
.status-confirmed { background: rgba(0, 50, 0, 0.3); color: #0f0; border-color: #004400; text-shadow: 0 0 5px #0f0; }
.status-shipped { background: rgba(0, 20, 60, 0.3); color: #0ff; border-color: #003366; text-shadow: 0 0 5px #0ff; }
.status-cancelled { background: rgba(60, 0, 0, 0.3); color: #f00; border-color: #440000; text-shadow: 0 0 5px #f00; }
.status-pending { background: rgba(60, 60, 0, 0.3); color: #ff0; border-color: #444400; text-shadow: 0 0 5px #ff0; }


/* --- Profile Tabs & Dashboard --- */
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.sidebar-menu a.active { 
    background-color: #330000 !important; 
    color: #fff !important; 
    border-left-color: #ff0000 !important; 
    box-shadow: inset 5px 0 10px rgba(255,0,0,0.2); 
}

/* Dashboard Cards */
.dash-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

.dash-card { 
    background: #050505; 
    border: 1px solid #330000; 
    padding: 20px; 
    border-radius: 4px; 
    text-align: center; 
    position: relative; 
    overflow: hidden; 
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.dash-card::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 3px; 
    background: linear-gradient(90deg, #500, #f00, #500); 
}

.dash-value { 
    font-size: 28px; 
    color: #fff; 
    font-weight: bold; 
    margin: 15px 0; 
    text-shadow: 0 0 10px #f00; 
    font-family: 'Courier New', monospace; 
}

.dash-label { 
    font-size: 11px; 
    color: #888; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
}

/* Status Badges */
.status-badge { 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-size: 10px; 
    font-weight: bold; 
    text-transform: uppercase; 
    border: 1px solid transparent; 
    display: inline-block;
    min-width: 80px;
    text-align: center;
}
.status-confirmed { background: rgba(0, 50, 0, 0.3); color: #0f0; border-color: #004400; text-shadow: 0 0 5px #0f0; }
.status-shipped { background: rgba(0, 20, 60, 0.3); color: #0ff; border-color: #003366; text-shadow: 0 0 5px #0ff; }
.status-cancelled { background: rgba(60, 0, 0, 0.3); color: #f00; border-color: #440000; text-shadow: 0 0 5px #f00; }
.status-pending { background: rgba(60, 60, 0, 0.3); color: #ff0; border-color: #444400; text-shadow: 0 0 5px #ff0; }

/* Settings Form Layout */
.settings-form-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.settings-column {
    flex: 1;
    min-width: 300px;
    box-sizing: border-box;
}

/* Fix for mobile screens where 300px is too wide */
@media screen and (max-width: 480px) {
    .settings-column {
        min-width: 100%;
        margin-bottom: 20px;
    }
    
    .profile-content {
        padding: 15px !important; /* Reduce padding on mobile */
    }
    
    /* Ensure no horizontal scroll on inputs */
    input[type="text"], 
    input[type="email"], 
    textarea {
        width: 100% !important;
        box-sizing: border-box; /* Include padding in width */
        max-width: 100%;
    }
}

/* Ajustes de layout para desktop/laptop sem afetar mobile */
@media screen and (min-width: 1024px) {
    .header-content-wrapper,
    .main-container {
        max-width: 1360px;
    }

    .content-wrapper {
        height: auto;
        min-height: calc(100vh - 350px);
        gap: 18px;
        align-items: flex-start;
    }

    .left-column {
        width: auto;
        flex: 0 0 clamp(230px, 22vw, 296px);
        position: sticky;
        top: 14px;
        align-self: flex-start;
        max-height: none;
        overflow: visible;
    }

    .middle-column {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
        height: auto;
        max-height: none;
        overflow: visible;
        padding-bottom: 30px;
    }

    .right-column {
        width: auto;
        flex: 0 0 clamp(220px, 18vw, 276px);
        top: 14px;
        max-height: calc(100vh - 190px);
        overflow-y: auto;
        padding-right: 3px;
    }

    .left-column .search-box.yellow-bg,
    .left-column .categories-box.white-bg {
        margin-bottom: 14px;
    }

    .right-column::-webkit-scrollbar {
        width: 6px;
    }

    .right-column::-webkit-scrollbar-track {
        background: #110000;
    }

    .right-column::-webkit-scrollbar-thumb {
        background: #550000;
        border-radius: 3px;
    }

    .recent-carousel-container {
        width: 100%;
    }

    .products-box.yellow-bg {
        grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
        gap: 14px;
    }
}

@media screen and (min-width: 1500px) {
    .header-content-wrapper,
    .main-container {
        max-width: 1480px;
    }

    .products-box.yellow-bg {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
}

/* Header refinado mantendo visual retro/deepweb */
.top-header {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(35, 0, 0, 0.2), rgba(0, 0, 0, 0)),
        repeating-linear-gradient(
            90deg,
            rgba(255, 0, 0, 0.06) 0,
            rgba(255, 0, 0, 0.06) 1px,
            rgba(0, 0, 0, 0.02) 1px,
            rgba(0, 0, 0, 0.02) 32px
        ),
        #000;
    padding: 16px 0 18px;
}

.top-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #ff0000;
    box-shadow: 0 0 8px #ff0000;
    opacity: 0.6;
    pointer-events: none;
}

.header-shell {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    min-height: 162px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
}

.header-logo img {
    height: clamp(106px, 10vw, 168px);
    filter: saturate(1.2) contrast(1.08);
}

.header-logo h1 {
    font-size: clamp(50px, 5.5vw, 78px);
    line-height: 0.9;
    letter-spacing: -1.4px;
    margin: 0;
}

.header-logo .green-text {
    font-size: clamp(22px, 2.1vw, 31px);
    letter-spacing: 0.4px;
    color: #ff3030;
}

.header-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    flex: 0 0 clamp(280px, 24vw, 370px);
    max-width: 370px;
    border: 1px solid #3b0000;
    border-top-color: #5f0000;
    padding: 10px 12px;
    background: linear-gradient(180deg, #160202, #060000);
    box-shadow: inset 0 0 20px rgba(255, 0, 0, 0.08);
}

.header-links-main {
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    line-height: 1.35;
}

.header-links-main a {
    display: inline-flex;
    align-items: center;
    color: #ff9f9f;
}

.header-links-status {
    width: 100%;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #224422;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: #0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.header-links-status span {
    white-space: nowrap;
}

.top-ticker {
    box-shadow: inset 0 1px 0 rgba(0, 255, 0, 0.24);
}

@media screen and (min-width: 1500px) {
    .header-shell {
        min-height: 184px;
    }
}

@media screen and (max-width: 1024px) {
    .header-shell {
        min-height: 136px;
    }

    .header-links {
        flex-basis: 320px;
        max-width: 320px;
    }
}

@media screen and (max-width: 768px) {
    .top-header {
        padding: 8px 0 10px;
    }

    .header-shell {
        min-height: auto;
        gap: 10px;
    }

    .header-logo img {
        height: 42px;
    }

    .header-logo h1 {
        font-size: 22px;
    }

    .header-logo .green-text {
        font-size: 17px;
    }

    .header-links {
        width: 100%;
        max-width: none;
        flex: 1 1 auto;
        padding: 8px 10px;
        align-items: center;
        text-align: center;
    }

    .header-links-main {
        font-size: 12px;
        line-height: 1.3;
    }

    .header-links-status {
        justify-content: center;
        font-size: 9px;
        gap: 4px 8px;
    }

}
