/* ==========================================================================
   GuestPocket D05 Brand Guide - Complete Light & Open Design System
   All Colors are 100% Controlled by Location Admin Settings (--primary, --accent)
   Templates Control Visual Structure, Radii, Shadows & Typography
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@600;700;800&family=Outfit:wght@600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --primary: #15945F;
  --accent: #745DE8;
  --bg-primary: #F5FAF7;
  --bg-card: #FFFFFF;
  --text-main: #15352A;
  --text-muted: #4a6358;
  --border-color: #e2ece7;

  --radius-card: 16px;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --card-border: 1px solid var(--border-color);
  --shadow-card: 0 4px 14px rgba(21, 53, 42, 0.05);
}

/* --------------------------------------------------------------------------
   10 Visually & Structurally Distinct Layout Systems
   -------------------------------------------------------------------------- */

[data-template="calm"] {
  --radius-card: 16px;
  --card-border: 1px solid var(--border-color);
  --font-heading: 'Plus Jakarta Sans', sans-serif;
}

[data-template="boutique"] {
  --font-heading: 'Outfit', sans-serif;
  --radius-card: 12px;
  --card-border: 1px solid rgba(21, 53, 42, 0.12);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.06);
}

[data-template="nature"] {
  --font-heading: 'Manrope', sans-serif;
  --radius-card: 22px;
  --card-border: 2px solid #d4e5dc;
  --shadow-card: 0 6px 20px rgba(21, 148, 95, 0.08);
}

[data-template="coastal"] {
  --font-heading: 'Outfit', sans-serif;
  --radius-card: 14px;
  --card-border: 1px solid #cbe3f5;
  --shadow-card: 0 6px 18px rgba(169, 217, 242, 0.25);
}

[data-template="urban"] {
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --radius-card: 4px;
  --card-border: 2px solid var(--text-main);
  --shadow-card: 4px 4px 0px var(--text-main);
}

[data-template="heritage"] {
  --font-heading: 'Outfit', sans-serif;
  --radius-card: 12px;
  --card-border: 1px dashed #c8dad2;
  --shadow-card: 0 4px 16px rgba(21, 53, 42, 0.04);
}

[data-template="family"] {
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --radius-card: 26px;
  --card-border: 3px solid var(--border-color);
  --shadow-card: 0 8px 24px rgba(21, 53, 42, 0.08);
}

[data-template="minimal"] {
  --font-heading: 'Inter', sans-serif;
  --radius-card: 6px;
  --card-border: 1px solid #edf2ef;
  --shadow-card: none;
}

[data-template="premium"] {
  --font-heading: 'Outfit', sans-serif;
  --radius-card: 20px;
  --card-border: 1px solid rgba(255, 255, 255, 0.6);
  --shadow-card: 0 16px 36px rgba(21, 53, 42, 0.12);
}

[data-template="playful"] {
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --radius-card: 28px 8px 28px 8px;
  --card-border: 2px solid var(--border-color);
  --shadow-card: 0 8px 20px rgba(116, 93, 232, 0.1);
}

/* --------------------------------------------------------------------------
   Global Design System Components & Base Layout
   -------------------------------------------------------------------------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  transition: background-color 0.3s ease;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-main);
}

.icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.2s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  background: #ffffff;
  border-bottom: 1px solid #e2ece7;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(21, 53, 42, 0.04);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: #15352A;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.nav-links { display: flex; gap: 0.75rem; align-items: center; }

.btn {
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(21, 148, 95, 0.2);
}

.btn-primary:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  border: 1px solid #e2ece7;
  color: #15352A;
}

.btn-outline:hover { background: #f5faf7; border-color: var(--primary); }

.container { max-width: 1240px; margin: 0 auto; padding: 2.5rem 1.5rem; }

.card {
  background: var(--bg-card);
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

/* Sleek Custom Select Dropdown Styling */
select, select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.85rem center !important;
  background-size: 1.1rem !important;
  padding-right: 2.5rem !important;
  border: 1.5px solid #c8dad2 !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  color: #15352A !important;
  box-shadow: 0 2px 8px rgba(21, 53, 42, 0.04) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

select:hover, select.form-control:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.12) !important;
  background-color: #fcfdfe !important;
}

select:focus, select.form-control:focus {
  border-color: var(--primary) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15) !important;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }

/* Smartphone Native Web App Frame */
.guest-app-frame {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  border-radius: 38px;
  border: 10px solid #1e293b;
  box-shadow: 0 25px 65px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  background: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 620px;
}

.guest-header {
  padding: 1rem 1.15rem 0.85rem 1.15rem;
  background: #ffffff;
  border-bottom: 1px solid #e2ece7;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .guest-app-frame {
    max-width: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }
}

/* Custom Flag Language Selector Pill & Dropdown */
.lang-selector-wrapper { position: relative; }

.lang-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(21, 53, 42, 0.05);
  transition: all 0.2s ease;
}
.lang-pill-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.lang-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.4rem;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(21, 53, 42, 0.12);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  z-index: 120;
  min-width: 130px;
  animation: fadeInSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease;
}
.lang-dropdown-item:hover, .lang-dropdown-item.active {
  background: rgba(21, 148, 95, 0.1);
  color: var(--primary);
}

/* ==========================================================================
   WORD-STYLE RICH TEXT & TABLE RENDERING STYLES
   ========================================================================== */

mark {
  background: #fef08a;
  color: #854d0e;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.rte-editor {
  min-height: 140px;
  background: #ffffff;
  border: 1px solid #c8dad2;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #15352A;
  overflow-y: auto;
  line-height: 1.6;
}
.rte-editor:focus {
  outline: 2px solid var(--primary);
  border-color: transparent;
}
.rte-editor h2 {
  font-size: 1.2rem;
  margin: 0.5rem 0 0.2rem 0;
  color: var(--primary);
}
.rte-editor ul {
  padding-left: 1.25rem;
  margin: 0.4rem 0;
}
.rte-editor table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
}
.rte-editor th {
  background: var(--primary);
  color: #ffffff;
  padding: 0.4rem 0.6rem;
  text-align: left;
}
.rte-editor td {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-color);
}

.guest-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.85rem 0;
  font-size: 0.82rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.guest-table th {
  background: var(--primary);
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: 700;
}
.guest-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}
.guest-table tr:nth-child(even) td {
  background: #F5FAF7;
}

/* Bottom Navigation Bar */
.guest-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(226, 236, 231, 0.8);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.65rem 0.5rem;
  z-index: 80;
  box-shadow: 0 -4px 20px rgba(21, 53, 42, 0.06);
}

.guest-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  gap: 0.25rem;
  padding: 0.4rem 0.75rem;
  border-radius: 14px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  user-select: none;
}

.guest-nav-item:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.guest-nav-item.active {
  color: var(--primary);
  background: rgba(21, 148, 95, 0.1);
}

.guest-nav-item.active .icon {
  transform: scale(1.18) translateY(-1px);
  stroke: var(--primary);
}

.guest-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 16px;
  height: 3px;
  background: var(--primary);
  border-radius: 999px;
  animation: tabPillPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tabPillPop {
  0% { transform: scaleX(0); opacity: 0; }
  100% { transform: scaleX(1); opacity: 1; }
}

.nav-badge-count {
  position: absolute;
  top: 2px;
  right: 10px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(21, 148, 95, 0.4);
  animation: pulseBadge 0.3s ease;
}

@keyframes pulseBadge {
  0% { transform: scale(0.6); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.tab-page-transition {
  animation: fadeInSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInSlide {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Badge & Form Components */
.badge {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.badge-live { background: rgba(21, 148, 95, 0.12); color: var(--primary); border: 1px solid rgba(21, 148, 95, 0.25); }
.badge-sky { background: #A9D9F2; color: #15352A; }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: #15352A; }
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #c8dad2;
  color: #15352A;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.form-control:focus { outline: 2px solid var(--primary); border-color: transparent; }

/* Drag & Drop Upload Dropzone */
.upload-dropzone {
  border: 2px dashed var(--primary);
  background: #F5FAF7;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.upload-dropzone:hover, .upload-dropzone.dragover {
  background: #e6f4ed;
  border-color: #11784c;
  transform: scale(1.01);
}
.upload-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-preview-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid #e2ece7;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-top: 0.75rem;
}
.upload-preview-thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e2ece7;
}

/* Premium Webshop Styles */
.shop-category-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
}
.shop-category-bar::-webkit-scrollbar { display: none; }

.shop-cat-chip {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d0e2d8;
  color: #15352A;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.shop-cat-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(21, 148, 95, 0.25);
}

.product-card-premium {
  background: #ffffff;
  border: 1px solid #e2ece7;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 14px rgba(21, 53, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21, 53, 42, 0.08);
  border-color: var(--primary);
}

.product-img-header {
  height: 130px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.product-cutoff-tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(21, 53, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.product-info-body { padding: 1.15rem; }

.allergen-chip {
  display: inline-block;
  background: #f0f7f2;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  margin-right: 0.25rem;
  margin-top: 0.35rem;
}

.floating-cart-bar {
  position: absolute;
  bottom: 65px;
  left: 1rem;
  right: 1rem;
  background: var(--text-main);
  color: #ffffff;
  border-radius: 16px;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 90;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.floating-cart-bar:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Kanban Board Columns */
.kanban-col {
  background: #ffffff;
  border: 1px solid #e2ece7;
  border-radius: 14px;
  padding: 1.25rem;
  min-height: 400px;
}
.kanban-card {
  background: #F5FAF7;
  border: 1px solid #d0e2d8;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.template-card-option {
  background: #ffffff;
  border: 2px solid #e2ece7;
  border-radius: 14px;
  padding: 1rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.template-card-option:hover, .template-card-option.active {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(21, 148, 95, 0.2);
}

/* Drag & Drop Visual Tile Studio Styles */
.visual-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.visual-tile-card {
  background: #ffffff;
  border: 2px solid #c8dad2;
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  position: relative;
  cursor: grab;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 14px rgba(21, 53, 42, 0.05);
}

.visual-tile-card:active {
  cursor: grabbing;
}

.visual-tile-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(21, 148, 95, 0.15);
}

.visual-tile-card.dragging {
  opacity: 0.4;
  transform: scale(0.95);
  border-style: dashed;
}

.tile-icon-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f0f7f2;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.visual-tile-card:hover .tile-icon-avatar {
  transform: scale(1.1);
  background: var(--primary);
  color: #ffffff;
}
