/* =========================
   PRO THEME (Day/Night)
   ========================= */

:root{
  /* Day */
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;

  --header-bg: #dff1ff;       /* soft light blue */
  --header-text: #0b2a4a;     /* dark blue text */
  --header-border: #bfe6ff;

  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);

  --input-bg: #ffffff;
  --input-border: #e5e7eb;
  --input-focus: #60a5fa;

  --primary: #0ea5e9;         /* blue */
  --primary-ink: #ffffff;

  --danger: #ef4444;
  --success: #22c55e;

  --badge-bg: rgba(15, 23, 42, 0.06);
  --hr: #e5e7eb;
}

html.dark{
  /* Night */
  --bg: #0b1220;              /* dark grey */
  --text: #e7eefc;
  --muted: #9fb0c6;

  --header-bg: #071a33;       /* dark blue */
  --header-text: #e7eefc;
  --header-border: #0f2a55;

  --card-bg: #0f1a2e;
  --card-border: #1b2b4a;
  --shadow: 0 18px 40px rgba(0,0,0,0.35);

  --input-bg: #0b162a;
  --input-border: #223555;
  --input-focus: #60a5fa;

  --primary: #38bdf8;
  --primary-ink: #062033;

  --danger: #fb7185;
  --success: #4ade80;

  --badge-bg: rgba(231, 238, 252, 0.08);
  --hr: #1b2b4a;
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

/* Header / Nav */
header{
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid var(--header-border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

nav.container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
}

.nav-left{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

nav a{
  color: var(--header-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: transform .08s ease, background .12s ease, opacity .12s ease;
}

nav a:hover{
  background: var(--badge-bg);
}

html.dark nav a:hover{
  background: rgba(231, 238, 252, 0.08);
}

/* Brand / Logo (Navbar left) */
.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;              /* matches nav a spacing */
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
}

/* Logo image */
.brand img{
  height: 30px;                 /* ideal SaaS navbar size */
  width: 30px;
  max-height: 30px;
  max-width: 120px;             /* prevents long logos */
  image-rendering: auto;
}

/* Optional brand text */
.brand-text{
  font-size: 14px;
  letter-spacing: -0.2px;
  color: var(--header-text);
}

/* Make logo hover match your nav hover feel */
.brand:hover{
  background: rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

html.dark .brand img{
  filter: brightness(1.15) contrast(1.05);
}

html.dark .brand:hover{
  background: rgba(231, 238, 252, 0.08);
}



/* Theme toggle button */
.theme-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--header-border);
  background: rgba(255,255,255,0.65);
  color: var(--header-text);
  font-weight: 800;
  cursor: pointer;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}

html.dark .theme-btn{
  background: rgba(15, 26, 46, 0.65);
  border-color: var(--header-border);
}

.theme-btn:hover{ transform: translateY(-1px); }
.theme-btn:active{ transform: translateY(0); }

.theme-icon{
  width: 18px; height: 18px;
  display: inline-block;
}

/* Layout */
.container{
  max-width: 980px;
  margin: 0 auto;
  padding: 8px 16px;
}

/* Grid / Cards */
.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.card{
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.card img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.card h3{
  margin: 10px 0 6px;
  font-size: 16px;
  letter-spacing: -0.2px;
}

.card p{ margin: 6px 0; }

/* Badges */
.badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--badge-bg);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge.ok{
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.22);
  color: var(--success);
}

.badge.out{
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.22);
  color: var(--danger);
}

/* Buttons */
button, .primary{
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .08s ease, filter .12s ease, background .12s ease, border-color .12s ease;
}

button:hover, .primary:hover{ filter: brightness(1.03); transform: translateY(-1px); }
button:active, .primary:active{ transform: translateY(0); }

button.primary, a.primary{
  background: var(--primary);
  color: var(--primary-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:disabled{
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* Inputs */
label{
  display: block;
  font-weight: 800;
  font-size: 13px;
  margin: 8px 0 6px;
  color: var(--muted);
}

input, textarea, select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}

input:focus, textarea:focus, select:focus{
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

textarea{ resize: vertical; min-height: 92px; }

/* Notice / helpers */
.notice{
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 5px solid var(--primary);
  padding: 12px 12px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.small{
  color: var(--muted);
  font-size: 13px;
}

.mini{
  color: var(--muted);
  font-size: 12px;
}

hr{
  border: 0;
  border-top: 1px solid var(--hr);
  margin: 18px 0;
}

/* Inline helper (admin) */
.inline{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Links */
a{ color: inherit; }
a:hover{ opacity: 0.92; }

/* Make primary links consistent */
a.primary{
  padding: 10px 14px;
}

/* Payment toggle UI */
.pay-wrap { margin-top: 10px; }
.pay-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: rgba(148,163,184,0.10);
}

.pay-btn {
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}

.pay-btn:hover { transform: translateY(-1px); }
.pay-btn.active {
  background: var(--primary);
  color: var(--primary-ink);
}

.pay-info {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.pay-info-title {
  font-weight: 900;
  margin-bottom: 6px;
}

.pay-info-text {
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.pay-info.hidden { display: none; }

/* ===== Compact search bar ===== */
.search-card{
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.65),
    rgba(255,255,255,0.45)
  );
  padding: 8px 12px;
  margin: 0 0 12px 0;
}

.search-card input{
  height: 38px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 12px;
}

html.dark .search-card{
  background: linear-gradient(
    180deg,
    rgba(15,26,46,0.85),
    rgba(15,26,46,0.65)
  );
}

/* ===== Product grid responsive layout ===== */
.grid{
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); /* default */
}

.gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 12px;
}

.gallery img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  cursor: pointer;
}

/* Admin photo manager */
.pstrip{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:8px 2px;
}

.pthumb{
  position:relative;
  width:84px;
  height:84px;
  border-radius:14px;
  border:1px solid var(--card-border);
  overflow:hidden;
  flex:0 0 auto;
  cursor: grab;
}

.pthumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.pthumb.drag-over{
  outline: 3px solid rgba(96,165,250,0.35);
}

.pdel{
  position:absolute;
  top:6px;
  right:6px;
  border-radius:999px;
  padding:6px 8px;
  font-weight:900;
  background: rgba(0,0,0,0.55);
  color:#fff;
  border:0;
}

/* Item page carousel */
.carousel{
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 10px 0 12px 0;
}

.carousel-track{
  display:flex;
  overflow-x:auto;
  scroll-snap-type: x mandatory;
  scroll-behavior:smooth;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: rgba(148,163,184,0.10);
}

.carousel-track::-webkit-scrollbar{ display:none; }
.carousel-track{ scrollbar-width:none; }

.carousel-slide{
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 1 / 1; 
}

.carousel-slide img{
  width:100%;
  height: 100%;
  object-fit: cover;
  display:block;
}


.car-btn{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 22px;
  font-weight: 900;
  background: rgba(0,0,0,0.45);
  color:#fff;
  border:0;
}

.car-btn.prev{ left: 10px; }
.car-btn.next{ right: 10px; }

.car-dots{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top: 10px;
}

.dot{
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  background: rgba(148,163,184,0.45);
}

.dot.active{
  background: rgba(56,189,248,0.95); /* uses your primary-ish feel */
}

/* ===== Floating Social Buttons ===== */
.social-float{
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.social-btn{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  transition: transform .15s ease, filter .15s ease;
}

.social-btn:hover{
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.social-btn svg{
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Brand colors */
.social-btn.ig{ color: #E1306C; }
.social-btn.fb{ color: #1877F2; }

/* Mobile tweak */
@media (max-width: 520px){
  .social-float{
    right: 12px;
    bottom: 12px;
  }
  .social-btn{
    width: 40px;
    height: 40px;
  }
}



/* Phone: 2 items per row */
@media (max-width: 520px){
  .grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px){
  .grid{ gap: 10px; }
}

/* Tablet: 3 items per row */
@media (min-width: 521px) and (max-width: 900px){
  .grid{
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop: 4 items per row */
@media (min-width: 901px){
  .grid{
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 520px){
  .card img{
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 520px){
  nav a{ padding: 7px 9px; }

  .nav-left{
    display: flex;
    align-items: center;
    gap: 6px;

    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    max-width: 100%;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-left::-webkit-scrollbar{ display: none; }

  .nav-left a{
    flex: 0 0 auto;
  }



  .brand-text{ display: none; }
  .brand{ padding: 2px 4px; }
  .brand img{ height: 22px; max-height: 22px; }
}

