/* =========================================
   iDROID THEME - CUSTOM CSS
   For SellAuth / Tailwind Integration
   ========================================= */

/* --- THEME VARIABLES --- */
:root {
    --idroid-amber: #ffae00;
    --idroid-amber-dim: #5c4410;
    --idroid-bg: #111;
    --idroid-grid: rgba(255, 174, 0, 0.4);
    --idroid-price-color: #00d4ff;
    --scanline-color: rgba(0, 0, 0, 0.5);
}

/* --- BASE OVERRIDES --- */
/* Forces the dark background and font across the entire site */
body {
    background-color: var(--idroid-bg) !important;
    color: var(--idroid-amber) !important;
    font-family: 'Share Tech Mono', monospace, ui-monospace, SFMono-Regular, Menlo !important;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Enforce square edges - Military terminal aesthetic */
*, *::before, *::after {
    border-radius: 0 !important;
}

/* Specific overrides for common elements */
.btn, 
.btn-buy, 
.card, 
input, 
select, 
textarea, 
button, 
.modal-content, 
.announcement-bar,
.bg-card,
.bg-accent-500,
.rounded,
.rounded-lg,
.rounded-md,
.rounded-sm,
rounded-full {
    border-radius: 0 !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: var(--idroid-amber); border-radius: 0 !important; }

/* --- ANIMATED BACKGROUND LAYERS --- */
/* These classes target the divs you will add to master.njk */
.grid-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(var(--idroid-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--idroid-grid) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    transform: perspective(500px) rotateX(20deg);
    animation: scrollGrid 10s linear infinite;
    opacity: 0.9;
    pointer-events: none;
}

@keyframes scrollGrid {
    0% { transform: perspective(500px) rotateX(20deg) translateY(0) translateX(0); }
    100% { transform: perspective(500px) rotateX(20deg) translateY(-50px) translateX(-50px); }
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.3)
    );
    background-size: 100% 4px;
    z-index: 900; /* High z-index to overlay on top of standard content */
    pointer-events: none;
    opacity: 0.7;
}

.noise {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.15;
    z-index: 899;
    pointer-events: none;
}

/* --- NAVBAR STYLING --- */
/* Add class="idroid-nav" to your header container */
.idroid-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-bottom: 2px solid var(--idroid-amber);
    background: rgba(10, 10, 10, 0.95);
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.8);
}

.nav-tab {
    padding: 8px 20px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
    font-size: 1.1em;
    color: var(--idroid-amber);
    text-transform: uppercase;
    text-decoration: none;
    clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
}

.nav-tab:hover, .nav-tab.active {
    background: rgba(255, 174, 0, 0.15);
    opacity: 1;
    border-bottom: 3px solid var(--idroid-amber);
    text-shadow: 0 0 5px var(--idroid-amber);
}

/* --- SIDEBAR CATEGORIES --- */
.category-item {
    padding: 12px 15px;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
    text-transform: uppercase;
    border-left: 2px solid transparent;
    font-size: 0.95em;
    color: var(--idroid-amber);
    display: block;
    text-decoration: none;
}

.category-item:hover {
    background: rgba(255, 174, 0, 0.1);
    padding-left: 20px;
}

.category-item.selected {
    background: var(--idroid-amber);
    color: #000 !important;
    font-weight: bold;
    border-left: 5px solid #fff;
    box-shadow: 0 0 15px var(--idroid-amber);
}

/* --- SHOP / CARD LAYOUT --- */
.content-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%;
}

.card {
    border: 1px solid var(--idroid-amber-dim);
    background: rgba(20, 20, 20, 0.85);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: 0.3s;
    position: relative;
    backdrop-filter: blur(2px);
    animation: cardBoot 0.4s ease-out backwards;
}

/* Stagger animation for items */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.25s; }

@keyframes cardBoot {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.card:hover {
    border-color: var(--idroid-amber);
    box-shadow: 0 0 15px rgba(255, 174, 0, 0.2);
    transform: translateY(-2px);
    background: rgba(40, 30, 10, 0.9);
}

.card-img-placeholder {
    height: 140px;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 174, 0, 0.05),
        rgba(255, 174, 0, 0.05) 5px,
        rgba(255, 174, 0, 0.08) 5px,
        rgba(255, 174, 0, 0.08) 10px
    );
    border: 1px solid var(--idroid-amber-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.card-img-placeholder img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Gloss effect line */
.card-img-placeholder::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,174,0,0.2), transparent);
    animation: gloss 3s infinite;
}

@keyframes gloss {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.card h3 {
    font-size: 1.1em;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--idroid-amber);
    margin: 0;
}

.card p {
    font-size: 0.85em;
    opacity: 0.7;
    color: var(--idroid-amber);
    margin: 0;
    line-height: 1.4;
}

.stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    border-top: 1px solid var(--idroid-amber-dim);
    padding-top: 8px;
    margin-top: auto;
    color: var(--idroid-amber);
    opacity: 0.8;
}

.price-tag {
    text-align: right;
    font-weight: bold;
    font-size: 1.2em;
    color: var(--idroid-price-color) !important;
}

/* Price color utility class */
.text-idroid-price {
    color: var(--idroid-price-color) !important;
}

/* --- BUTTONS --- */
.btn-buy {
    display: block;
    width: 100%;
    text-align: center;
    background: transparent;
    border: 1px solid var(--idroid-amber);
    color: var(--idroid-amber);
    padding: 10px;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s;
    font-weight: bold;
    font-size: 0.9em;
    margin-top: 5px;
}

.btn-buy:hover {
    background: var(--idroid-amber);
    color: #000;
    box-shadow: 0 0 10px var(--idroid-amber);
}

.btn-buy:active {
    transform: scale(0.98);
}