* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #111827;
    color: white;
}

/* =========================
   LOGIN
========================= */

.center-screen {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.login-box h1 {
    margin-top: 0;
}

.login-box p {
    color: #9ca3af;
    margin-bottom: 24px;
}

.login-box input {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #374151;
    background: #111827;
    color: white;
    margin-bottom: 16px;
    font-size: 1rem;
}

.login-box button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

.login-box button:hover {
    background: #3b82f6;
}

#error {
    margin-top: 16px;
    color: #f87171;
}

/* =========================
   LAYOUT
========================= */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.container h1 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #9ca3af;
    margin-bottom: 50px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* =========================
   PRICEFILTER
========================= */

.top-bar {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1000;
}

.menu-btn {
    background: #1f2937;
    border: 1px solid #374151;
    color: white;
    font-size: 20px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
}

.menu-btn:hover {
    border-color: #60a5fa;
}

/* =========================
   DRAWER PANEL
========================= */

.price-panel {
    position: fixed;
    top: 0;
    right: 0;

    height: 100vh;
    width: 320px;

    background: #1f2937;
    border-left: 1px solid #374151;

    padding: 20px;
    z-index: 999;

    display: flex;
    flex-direction: column;
    gap: 20px;

    transform: translateX(0);
    transition: transform 0.25s ease;
}

.price-panel.hidden {
    transform: translateX(100%);
}

/* =========================
   VERTICAL SLIDER FIX
   (Chrome-safe method)
========================= */

.price-panel input[type="range"] {

	
    -webkit-appearance: none;
    appearance: none;
	
	touch-action: none;
    overscroll-behavior: contain;
	
    width: 220px;
    height: 30px;

    transform: rotate(-90deg);
    transform-origin: center;

    background: transparent;
    outline: none;
    margin: 40px auto;
}

/* TRACK */
.price-panel input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: #374151;
    border-radius: 999px;
}

.price-panel input[type="range"]::-moz-range-track {
    height: 6px;
    background: #374151;
    border-radius: 999px;
}

/* THUMB */
.price-panel input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;

    width: 18px;
    height: 18px;
    border-radius: 50%;

    background: #60a5fa;
    border: none;
    cursor: pointer;
    margin-top: -6px;
}

.price-panel input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;

    background: #60a5fa;
    border: none;
    cursor: pointer;
}
/* =========================
   CATEGORY
========================= */

.category {
    margin-bottom: 70px;
}

.category-header {
	margin: 0;
    font-size: 2rem;
    margin-bottom: 25px;
    border-left: 5px solid #60a5fa;
    padding-left: 16px;
}

.category-header h2 {
    margin: 0;
    font-size: 2rem;
}

.category-header p {
    margin: 2px 0 0 0;
    color: #9ca3af;
    font-size: 1rem;
    line-height: 1.4;
}

/* =========================
   CARD
========================= */

.card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	text-decoration: none;
    color: inherit;
}
.card:focus,
.card:hover {
    transform: translateY(-6px);
    border-color: #60a5fa;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	cursor: pointer;
}

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #0f172a;
}

.card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-wrapper {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* dark gradient for readability */
.image-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.25),
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0)
    );
}

/* overlay container */
.image-overlay {
    position: absolute;
    inset: 0;
    padding: 0;
    z-index: 2;
}

.overlay-title {
    position: absolute;
    bottom: 10px;
    left: 0;

    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);

    padding: 1px 10px;

    border-radius: 0 2px 5px 0;

    font-weight: 700;
    color: #ffffff;
    font-size: 0.95rem;
}

.overlay-price {
    position: absolute;
    top: 10px;
    right: 10px;

    background: #ffffff;
    color: #b91c1c;

    font-weight: 800;
    font-size: 0.95rem;
    white-space: nowrap;

    padding: 6px 12px;
    border-radius: 3px;

    /* creates white outer padding look + red border */
    box-shadow:
        0 0 0 3px #ffffff,   /* outer white “margin” */
        inset 0 0 0 2px #b91c1c; /* inner red border */

    letter-spacing: 0.3px;
}


/* =========================
   CARD HEADER (TITLE + PRICE)
========================= */

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.card-header .title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: #f9fafb;
    flex: 1;
}

.card-header .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #60a5fa;
    white-space: nowrap;
}

/* =========================
   LINK
========================= */

.link {
    font-size: 0.75rem;
    font-style: italic;
    color: #9ca3af;
    word-break: break-word;
    margin-top: 2px;
}

.link a {
    color: inherit;
    text-decoration: none;
}

.link a:hover {
    color: #ffffff;
}

/* =========================
   EXTRA INFO
========================= */

.subtext {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.4;
}

.requires {
    font-size: 0.8rem;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.15);
}

/* =========================
   LOCKED STATE
========================= */

.card.locked {
    opacity: 0.4;
    filter: grayscale(1);
    pointer-events: none;
    position: relative;
}

.card.locked::after {
    content: "Locked requirement missing";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 8px;
}

/* =========================
   NOTE
========================= */

.note {
    color: #d1d5db;
    line-height: 1.5;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
	.overlay-price {
		font-size: 0.8rem;
	}
	.link {
		font-size: 0.5rem;
	}
	
	.card-content {
		padding: 10px;
	}
	
    body {
        font-size: 0.9em;
    }
}

