/* Modernized styling for Textilirium — local-only CSS */
:root {
  --bg: #0f1724;
  --card: #ffffff;
  --muted: #6b7280;
  --accent: #807f7e;
  /* warm orange */
  --accent-2: #3a3a3a;
  /* purple */
  --glass: rgba(255, 255, 255, 0.06);
  --radius: 14px;
  --max-width: 1100px;

  /* New design system variables */
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-hover: #f1f5f9;
  --text: #0f172a;
  --text-strong: #0f172a;
  --border: #e2e8f0;
  --border-hover: #94a3b8;
  --primary: var(--accent-2);
  --primary-alpha: rgba(124, 58, 237, 0.2);
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box
}

html {
  background-color: #f3f4f6;
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  color: #0b1220;
  background: linear-gradient(180deg, #fbfbff 0%, #f3f4f6 100%) fixed !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px
}

/* Header */
.site-header {
  background: transparent;
  padding: 22px 0
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.brand h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0.2px
}

.tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem
}

.top-right {
  display: flex;
  align-items: center;
  gap: 12px
}

.lang-switch {
  display: flex;
  gap: 8px
}

.lang-switch.mobile {
  display: none;
}

.lang-link {
  display: inline-block;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  transition: all 0.2s ease;
}

.lang-link:hover {
  background: var(--surface-hover);
  color: var(--text-strong);
}

.lang-link.active {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  color: white;
}

.cta {
  background: transparent;
  border: 1px solid rgba(15, 20, 36, 0.08);
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600
}

.cta:hover {
  transform: translateY(-1px)
}

/* Hero */
.hero {
  padding: 28px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 26px;
  align-items: start;
}

.hero-left {
  position: relative;
  height: 500px;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-carousel {
  position: absolute;
  inset: 0;
  background: var(--bg);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 40px;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0.75) 0%,
      rgba(0, 0, 0, 0.4) 25%,
      rgba(0, 0, 0, 0.4) 75%,
      rgba(0, 0, 0, 0.75) 100%);
  color: white;
}

.hero-text {
  padding: 20px;
  background: rgb(77 69 69 / 55%);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.hero-left h2 {
  margin: 0 0 15px;
  font-size: 1.8rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

.lead {
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  font-size: 1.1rem;
  line-height: 1.5;
}

.hero-actions {
  margin-top: auto;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border: none;
  color: white;
  font-weight: 700
}

.button.ghost {
  background: transparent;
  border: 1px solid rgba(11, 17, 32, 0.06);
  color: var(--muted)
}

/* Pills */
.hero-whatwherewhen {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06)
}

.pills {
  display: flex;
  flex-direction: column;
  gap: 12px
}

.pill {
  display: flex;
  gap: 12px;
  align-items: center
}

.pill .icon {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(157, 157, 157, 0.2), rgba(251, 251, 251, 0.5));
  border-radius: 10px;
  color: var(--accent-2)
}

.pill-text strong {
  display: block
}

.pill-text span {
  color: var(--muted);
  font-size: 0.95rem
}

.mini-contact {
  margin-top: 14px;
  border-top: 1px solid rgba(15, 20, 36, 0.04);
  padding-top: 12px
}

.mini-contact .phone {
  font-weight: 700
}

.mini-contact .email {
  display: block;
  color: var(--muted);
  text-decoration: none
}

/* Main grid */
.main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px
}

.card {
  background: white;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04)
}

/* Products */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px
}

.product-item {
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.03), rgba(249, 115, 22, 0.02));
  border: 1px solid rgba(15, 20, 36, 0.03);
  font-weight: 600
}

/* Hours */
.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(15, 20, 36, 0.03);
  height: 60px;
  /* Set a fixed height for each row */
}

.closed-dates {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 0
}

.closed-dates li {
  padding: 6px 0;
  color: var(--muted)
}

/* Contact */
.address-section {
  display: grid;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.address {
  color: var(--muted);
  white-space: pre-wrap;
  margin: 0;
}

.map-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-alt);
  aspect-ratio: 16/9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.google-map {
  width: 100%;
  height: 100%;
  border: none;
}

.view-larger-map {
  position: absolute;
  bottom: var(--spacing-sm);
  right: var(--spacing-sm);
  background: rgba(255, 255, 255, 0.9);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--text-strong);
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.view-larger-map:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px
}

.contact-form label {
  display: block
}

.contact-form input[type=text],
.contact-form input[type=email],
.contact-form textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(15, 20, 36, 0.06)
}

/* Footer */
.site-foot {
  border-top: 1px solid rgba(15, 20, 36, 0.04);
  margin-top: 28px;
  padding: 14px 0;
  text-align: center;
  color: var(--muted)
}

.admin-link {
  margin-left: 12px;
  font-size: 0.9rem
}

/* Responsive */
@media (max-width:880px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-whatwherewhen {
    order: 2;
  }

  .hero-left {
    height: auto;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
  }

  .map-container {
    aspect-ratio: 4/3;
  }
  
  .view-larger-map {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.75rem;
  }

  .hero-content {
    position: relative;
    order: -1;
    inset: auto;
    background: none;
    padding: 0;
    margin-bottom: 20px;
    color: var(--text);
  }

  .hero-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    overflow: hidden;
    order: 2;
  }

  .hero-text {
    background: none;
    backdrop-filter: none;
    padding: 0;
    margin: 0;
  }

  .hero-left h2 {
    font-size: 1.5rem;
    color: var(--text-strong);
    text-shadow: none;
    margin-bottom: 12px;
  }

  .lead {
    color: var(--text);
    text-shadow: none;
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .hero-actions {
    margin: 0;
    order: 3;
    padding-top: 20px;
  }
}

@media (max-width:480px) {
  .hero-left {
    padding: 16px;
  }

  .hero-left h2 {
    font-size: 1.3rem;
    letter-spacing: 0;
  }

  .lead {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .hero-actions {
    text-align: center;
  }

  .hero-carousel {
    aspect-ratio: 4/3;
  }
}


/* Admin */
.section {
  background: var(--surface);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section h2 {
  margin-top: 0;
  margin-bottom: var(--spacing-lg);
  color: var(--text-strong);
  font-size: 1.25rem;
}

.opening-hours-grid {
  display: grid;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
}

.day-row {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: 100px 1fr;
  align-items: start;
  padding: var(--spacing-sm);
  background: var(--surface);
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease;
}

.day-row:hover {
  background: var(--surface-hover);
}

.hours-column {
  display: grid;
  gap: var(--spacing-md);
}

.time-block {
  background: var(--surface-alt);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
}

.time-inputs {
  display: grid;
  gap: var(--spacing-sm);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.time-inputs label {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  font-size: 0.875rem;
  color: var(--text-strong);
}

.time-inputs input[type="time"] {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.time-inputs input[type="time"]:hover {
  border-color: var(--border-hover);
}

.time-inputs input[type="time"]:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-alpha);
}

.day-name {
  padding-top: var(--spacing-sm);
  color: var(--text-strong);
  font-size: 0.875rem;
}

/* Alert modal */
.alert-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(rgba(15, 23, 36, 0.9), rgba(15, 23, 36, 0.85));
    backdrop-filter: blur(8px);
    padding: var(--spacing-lg);
    color: white;
    animation: slideDown 0.3s ease-out;
}

.alert-content {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.alert-lang-switch {
    display: flex;
    gap: var(--spacing-xs);
}

.lang-button {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-button:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.lang-button.active {
    background: white;
    color: var(--text-strong);
    border-color: white;
}

.lang-button.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.alert-language-content {
    display: none;
}

.alert-language-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.alert-content h3 {
    margin: 0 0 var(--spacing-sm);
    font-size: 1.2rem;
    font-weight: 600;
}

.alert-message {
    font-size: 0.95rem;
    line-height: 1.5;
}

.close-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.close-alert:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .alert-modal {
        padding: var(--spacing-sm);
    }

    .alert-content {
        padding: var(--spacing-sm);
    }

    .alert-header {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .alert-lang-switch {
        order: 2;
        flex-grow: 1;
        justify-content: flex-start;
    }

    .close-alert {
        order: 1;
    }

    .alert-content h3 {
        font-size: 1.1rem;
        margin-top: var(--spacing-sm);
    }

    .alert-message {
        font-size: 0.9rem;
    }

    .lang-button {
        flex: 1;
        text-align: center;
    }
}

/* Admin small helpers */
.error {
    color: #b00020;
}

.success {
    color: green;
}

/* Mobile styles */
@media (max-width: 768px) {
  .lang-switch.desktop {
    display: none;
  }

  .lang-switch.mobile {
    display: block;
    position: absolute;
    right: 20px;
    top: 20px;
  }

  .lang-select {
    appearance: none;
    width: 70px;
    padding: var(--spacing-xs) var(--spacing-lg) var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    color: var(--text-strong);
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;

    /* Custom dropdown arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
  }

  .lang-select:hover {
    border-color: var(--border-hover);
    background-color: var(--surface-hover);
  }

  .lang-select:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 2px var(--primary-alpha);
  }
}