/* =========================================
   BASE STYLES
   ========================================= */
body { background-color: #121212; color: #e0e0e0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; }
header { width: 100%; text-align: center; padding: 20px 0; background-color: #000000; border-bottom: 2px solid #333; }
.logo { max-width: 80%; height: auto; }

/* =========================================
   LOGIN & ADMIN CONTAINERS
   ========================================= */
.container { width: 90%; max-width: 400px; margin-top: 50px; background: #1f1f1f; padding: 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
input[type="password"], input[type="text"], input[type="number"], textarea, select { width: 100%; padding: 12px; margin: 10px 0; background: #2c2c2c; border: 1px solid #444; color: #fff; border-radius: 4px; box-sizing: border-box; }
button { width: 100%; padding: 12px; background-color: #007bff; border: none; color: white; font-weight: bold; cursor: pointer; border-radius: 4px; }
button:hover { background-color: #0056b3; }

/* =========================================
   ALERTS & UI ELEMENTS
   ========================================= */
.error { color: #ff6b6b; text-align: center; margin-bottom: 10px; }
.alert-box { background-color: #ffeaea; color: #dc3545; padding: 15px; border-radius: 4px; margin-bottom: 20px; text-align: center; font-weight: bold; border: 1px solid #dc3545; }
.visual-break { border: 0; border-top: 1px solid #444; margin: 20px 0; }
.highlight-label { color: #007bff; font-weight: bold; font-size: 1.1em; }

/* =========================================
   HORIZONTAL CATEGORY NAVIGATION
   ========================================= */
.nav-bar { display: flex; overflow-x: auto; background: #1f1f1f; padding: 15px 10px; margin-bottom: 20px; border-bottom: 2px solid #333; width: 100%; box-sizing: border-box; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav-bar::-webkit-scrollbar { display: none; }
.nav-bar a { flex: 0 0 auto; white-space: nowrap; color: #e0e0e0; text-decoration: none; padding: 8px 15px; margin-right: 10px; border-radius: 20px; background: #2c2c2c; font-size: 0.9em; }
.nav-bar a:hover { background: #007bff; }
.nav-bar a.active { background: #007bff; font-weight: bold; color: #fff; }

/* =========================================
   GALLERY GRID & PRODUCT CARDS
   ========================================= */
.gallery-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 95%; max-width: 1200px; margin: 0 auto 40px auto; }
.product-card { background: #1f1f1f; border-radius: 8px; width: 100%; min-width: 0; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.5); display: flex; flex-direction: column; }
.product-card-body { padding: 10px; display: flex; flex-direction: column; }
.category-tag { font-size: 0.65em; color: #007bff; text-transform: uppercase; font-weight: bold; margin-bottom: 5px; display: inline-block; letter-spacing: 1px;}
.product-card h3 { margin: 0 0 5px 0; font-size: 0.95em; color: #fff; line-height: 1.2; }

/* =========================================
   8-LINE TEXT CLAMPING & SHOW MORE BUTTON
   ========================================= */
.product-text { color: #ccc; line-height: 1.4; margin: 0; font-size: 0.85em; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.read-more-btn { background: none; border: none; color: #007bff; padding: 8px 0 0 0; font-size: 0.85em; font-weight: bold; cursor: pointer; text-align: left; width: fit-content; }
.read-more-btn:hover { color: #0056b3; }

/* =========================================
   MULTI-MEDIA SWIPE CAROUSEL & ARROWS
   ========================================= */
.carousel-wrapper { position: relative; }
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-bottom: 1px solid #333; background: #000; }
.carousel::-webkit-scrollbar { display: none; }
.carousel-item { flex: 0 0 100%; width: 100%; height: 160px; object-fit: contain; scroll-snap-align: center; cursor: pointer; }
.carousel-item:hover { opacity: 0.8; }
video.carousel-item { cursor: default; } 

/* The New Hover Arrows */
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; border: none; padding: 0; cursor: pointer; z-index: 10; font-size: 16px; border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.carousel-btn:hover { background: rgba(0,123,255,0.8); }
.left-btn { left: 5px; }
.right-btn { right: 5px; }

/* The Photo Counter Badge */
.carousel-indicator { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,0.6); color: white; font-size: 0.7em; padding: 3px 8px; border-radius: 10px; z-index: 10; pointer-events: none; font-weight: bold; }


/* =========================================
   LARGER SCREENS (Tablets & Desktops)
   ========================================= */
@media (min-width: 600px) {
    .gallery-container { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
    .carousel-item { height: 200px; } 
    .product-card-body { padding: 15px; }
    .category-tag { font-size: 0.75em; margin-bottom: 10px; }
    .product-card h3 { font-size: 1.2em; margin-bottom: 10px; }
    .product-text { font-size: 0.95em; line-height: 1.5; }
    .carousel-btn { width: 40px; height: 40px; font-size: 20px; } /* Bigger arrows on desktop */
}

/* =========================================
   LIGHTBOX POP-UP MODAL
   ========================================= */
.modal { visibility: hidden; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
.modal.show { visibility: visible; opacity: 1; }
.modal-content { max-width: 95%; max-height: 95%; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.8); }
.close-modal { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; }

/* =========================================
   ADMIN DASHBOARD TABS
   ========================================= */
.admin-tabs { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab-btn { background: #2c2c2c; color: #aaa; border: none; padding: 12px 20px; border-radius: 4px; font-weight: bold; font-size: 0.95em; cursor: pointer; white-space: nowrap; width: auto; flex: 0 0 auto; transition: background 0.2s, color 0.2s; }
.admin-tab-btn:hover { background: #444; color: #fff; }
.admin-tab-btn.active { background: #007bff; color: #fff; box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4); }
.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); } }