/* --- Global Styles --- */
/* Font imports from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900;1,400..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&display=swap');

body, h1, h2, h3, h4, p, ul, li, form {
    margin: 0;
    padding: 0;
}

:root {
  --primary-color: #8b4513; /* Saddle brown - warm fall brown */
  --secondary-color: #d2691e; /* Chocolate - autumn orange-brown */
  --accent-color: #556b2f; /* Dark olive green - fall foliage */
  --light-color: #f5f5dc; /* Beige - soft autumn background */
  --dark-color: #2e1a0f; /* Dark brown - deep wood color */
  --gold-color: #daa520; /* Goldenrod - fall accent */
  --rust-color: #b7410e; /* Rust - autumn leaves */
  --shadow-color: rgba(0, 0, 0, 0.25);
  --border-radius: 8px;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    background-image: 
        url('https://images.unsplash.com/photo-1601662528567-526cd06f6582?auto=format&fit=crop&w=1920'),
        linear-gradient(rgba(245, 245, 220, 0.7), rgba(245, 245, 220, 0.7));
    background-blend-mode: overlay;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    min-height: 100vh;
}

/* Alternative stonewall background (choose one) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1541701494587-cb58502866ab?auto=format&fit=crop&w=1920');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3 {
    font-family: 'Dancing Script', cursive;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

main {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* --- Header & Navigation --- */
header {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.38)),
        url('images/header-dark-oak-planks.png');
    background-size: cover;
    background-position: center;
    padding: 25px 40px;
    color: var(--light-color);
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid var(--gold-color);
    position: relative;
    overflow: hidden;
}

header > * {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3em;
    color: var(--light-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

nav ul {
    list-style-type: none;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

nav ul li a {
    color: var(--light-color);
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 400;
    padding: 8px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-family: 'Dancing Script', cursive;
    background-color: rgba(139, 69, 19, 0.6);
    border: 1px solid var(--gold-color);
}

nav ul li a:hover {
    background-color: var(--gold-color);
    color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* --- Language Toggle Button --- */
.language-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.language-btn {
    background-color: var(--gold-color);
    color: var(--dark-color);
    border: 2px solid var(--light-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.language-btn:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.language-btn i {
    font-size: 1.1em;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
  color: var(--light-color);
  padding: 14px 30px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1em;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-family: 'Dancing Script', cursive;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  background: linear-gradient(to bottom, var(--gold-color), var(--secondary-color));
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  color: var(--dark-color);
}

.btn-secondary {
  background: linear-gradient(to bottom, #6d4c41, #4e342e);
  font-size: 0.95em;
  padding: 10px 20px;
}

.btn-secondary:hover {
  background: linear-gradient(to bottom, var(--accent-color), #3e4f24);
  color: var(--light-color);
}

.btn-danger {
  background: linear-gradient(to bottom, #a52a2a, #6d1f1f);
  padding: 8px 18px;
  font-size: 0.95em;
}

.btn-danger:hover {
  background: linear-gradient(to bottom, #c0392b, #922b21);
  color: var(--light-color);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9em;
  letter-spacing: 0.5px;
}

/* --- Admin --- */
.admin-section .subtitle {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.admin-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  margin-bottom: 8px;
}

.admin-panel-header h3 {
  margin-bottom: 0;
}

.admin-login-section .admin-login-card {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.admin-login-error {
  color: #8b2500;
  font-size: 0.95em;
  margin: 8px 0 0;
  text-align: left;
}

.admin-login-card button[type="submit"] {
  margin-top: 18px;
}

.admin-message {
  min-height: 1.5em;
  text-align: center;
  margin-bottom: 16px;
  font-weight: 500;
}

.admin-message-ok {
  color: var(--accent-color);
}

.admin-message-error {
  color: #8b2500;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 8px;
}

.admin-column-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  align-self: start;
}

.admin-form-card,
.admin-list-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--border-radius);
  padding: 22px 24px;
  box-shadow: 0 4px 16px var(--shadow-color);
  border: 1px solid rgba(139, 69, 19, 0.2);
}

.admin-card-title {
  font-family: 'Roboto', sans-serif;
  font-size: 1.15rem;
  color: var(--primary-color);
  margin-bottom: 14px;
  font-weight: 600;
}

.admin-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-list-header .admin-card-title {
  margin-bottom: 0;
}

.admin-basket-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-basket-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(245, 245, 220, 0.6);
  border-radius: var(--border-radius);
  border: 1px solid rgba(139, 69, 19, 0.15);
  overflow: hidden;
}

.admin-basket-item--hidden {
  opacity: 0.78;
  border-style: dashed;
}

.admin-basket-hidden-note {
  display: block;
  margin-top: 4px;
  font-size: 0.82em;
  font-style: italic;
  color: rgba(62, 39, 35, 0.75);
}

.admin-basket-visibility-label {
  margin-top: 12px;
}

.admin-basket-visibility-edit {
  margin-top: 6px;
}

.admin-basket-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
}

.admin-basket-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-basket-edit-panel {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(139, 69, 19, 0.12);
  background: rgba(255, 255, 255, 0.45);
}

.admin-basket-edit-panel .form-group {
  margin-bottom: 0;
}

.admin-basket-edit-panel label {
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 0.9em;
}

.admin-basket-edit-panel label:first-of-type {
  margin-top: 0;
}

.admin-basket-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.admin-basket-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.admin-basket-info {
  flex: 1;
  min-width: 0;
}

.admin-basket-title {
  display: block;
  font-weight: 500;
  color: var(--dark-color);
  word-break: break-word;
}

.admin-empty {
  text-align: center;
  color: #5d4037;
  padding: 16px;
  font-style: italic;
}

.admin-form-card button[type="submit"] {
  margin-top: 18px;
}

.admin-file-input {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.95em;
  border: 2px solid var(--secondary-color);
  border-radius: var(--border-radius);
  background-color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  box-sizing: border-box;
}

.admin-file-input::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--gold-color);
  background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
  color: var(--light-color);
  font-family: 'Roboto', sans-serif;
  font-size: 0.9em;
  cursor: pointer;
}

.admin-file-input::file-selector-button:hover {
  background: linear-gradient(to bottom, var(--gold-color), var(--secondary-color));
  color: var(--dark-color);
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-column-left {
    gap: 20px;
  }
}

/* --- Sections & Content --- */
.hero-section {
  background-image: 
      url('https://images.unsplash.com/photo-1578301978693-85fa9c0320b9?auto=format&fit=crop&w=1920'),
      linear-gradient(rgba(139, 69, 19, 0.7), rgba(85, 107, 47, 0.7));
  background-blend-mode: overlay;
  background-size: cover;
  background-position: center;
  color: var(--light-color);
  text-align: center;
  padding: 100px 20px;
  border-radius: 15px;
  margin: 30px 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border: 3px solid var(--gold-color);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&w=1920');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    pointer-events: none;
}

.hero-content {
  background-color: rgba(46, 26, 15, 0.8);
  padding: 40px;
  border-radius: 10px;
  display: inline-block;
  max-width: 800px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(2px);
  border: 1px solid var(--gold-color);
}

.hero-section h2 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--gold-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
    font-size: 1.3em;
    margin-bottom: 30px;
    line-height: 1.8;
}

.products-section,
.contact-section {
  padding: 40px;
  background-color: rgba(255, 255, 255, 0.9);
  background-image: 
      linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
      url('https://images.unsplash.com/photo-1500462918059-b1a0cb512f1d?auto=format&fit=crop&w=1920');
  background-blend-mode: overlay;
  background-size: cover;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  margin-bottom: 30px;
  text-align: center;
  border: 2px solid var(--secondary-color);
}

.contact-ooo-notice {
  max-width: 640px;
  margin: 0 auto 28px;
  padding: 24px 28px;
  background: rgba(255, 248, 220, 0.95);
  border: 2px solid var(--gold-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.contact-ooo-message-text {
  margin: 0;
  font-size: 1.15em;
  line-height: 1.7;
  color: var(--dark-color);
  font-style: normal;
  text-align: center;
}

.contact-ooo-intro .contact-ooo-lead {
  margin-bottom: 24px;
}

.admin-contact-card {
  text-align: left;
}

.admin-away-row {
  margin-bottom: 18px;
}

.admin-contact-fields textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 110px;
  font-family: 'Roboto', sans-serif;
  font-size: 1em;
  padding: 10px 12px;
  border: 2px solid var(--secondary-color);
  border-radius: var(--border-radius);
  resize: vertical;
}

.admin-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.admin-contact-feedback {
  margin-top: 12px;
  font-size: 0.95em;
  color: var(--accent-color);
  min-height: 1.3em;
}

/* Index page: baskets block — fall trees background */
#baskets-section {
  background-image:
      linear-gradient(rgba(245, 245, 220, 0.88), rgba(245, 245, 220, 0.82)),
      url('https://images.unsplash.com/photo-1523712999610-f77fbcfc3843?auto=format&fit=crop&w=1920');
  background-blend-mode: normal;
  background-size: cover;
  background-position: center;
}

.products-section h3,
.contact-section h2 {
  font-size: 2.8em;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
  color: var(--primary-color);
}

.products-section h3::after,
.contact-section h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, var(--gold-color), var(--rust-color));
  margin: 15px auto 0;
  border-radius: 2px;
}

.products-section .subtitle,
.contact-section p {
  font-style: italic;
  color: var(--secondary-color);
  margin-bottom: 40px;
  font-size: 1.2em;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
}

a.product-item {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-item {
  border: 2px solid var(--secondary-color);
  padding: 20px;
  background-image:
      linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.38)),
      url('images/header-dark-oak-planks.png');
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  box-shadow: 0 4px 8px var(--shadow-color);
  transition: all 0.3s ease;
  overflow: hidden;
}

.product-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 12px 24px var(--shadow-color);
  border-color: var(--gold-color);
}

.product-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 15px;
  border: 1px solid rgba(245, 245, 220, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.product-item h4 {
  font-size: 1.6em;
  margin-bottom: 10px;
  color: var(--light-color);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  font-family: 'Dancing Script', cursive;
}

.product-item .product-item-see-more {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  margin-top: 4px;
  margin-bottom: 0;
}

.product-item .price {
  color: var(--rust-color);
  font-weight: bold;
  font-size: 1.3em;
}

.has-basket-lightbox:not(.has-basket-lightbox--image-only) .product-item {
  cursor: zoom-in;
}

.has-basket-lightbox--image-only .product-item > img {
  cursor: zoom-in;
}

body.basket-lightbox-open {
  overflow: hidden;
}

.basket-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
}

.basket-lightbox.is-open {
  display: flex;
}

.basket-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--light-color, #faf8f5);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.basket-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.basket-lightbox-inner {
  margin: 0;
  max-width: min(92vw, 1100px);
  max-height: 90vh;
  text-align: center;
  cursor: default;
}

.basket-lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 4rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  margin: 0 auto;
}

.basket-lightbox-caption {
  margin-top: 14px;
  font-family: 'Dancing Script', cursive;
  font-size: 1.75rem;
  color: var(--light-color, #faf8f5);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.basket-lightbox-caption:empty,
.basket-lightbox-caption[hidden] {
  display: none;
}

/* Fall leaves decoration */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1575052814086-f385e2e2ad1b?auto=format&fit=crop&w=1920');
    background-size: cover;
    background-position: center;
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

/* --- Contact Form --- */
.form-container {
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--primary-color);
    font-family: 'Dancing Script', cursive;
    font-size: 1.4em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%238b4513' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--gold-color);
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.4);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group .email-field {
    margin-bottom: 0;
}

.form-group .field-hint {
    margin: 8px 0 0;
    font-size: 0.85em;
    font-weight: normal;
    font-family: 'Roboto', sans-serif;
    color: rgba(0, 0, 0, 0.65);
}

.form-group .field-error {
    margin: 8px 0 0;
    font-size: 0.9em;
    font-weight: normal;
    font-family: 'Roboto', sans-serif;
    color: #b00020;
}

/* --- Footer --- */
footer {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.38)),
        url('images/header-dark-oak-planks.png');
    background-size: cover;
    background-position: center;
    padding: 30px;
    color: var(--light-color);
    text-align: center;
    box-shadow: 0 -4px 10px var(--shadow-color);
    margin-top: 40px;
    border-top: 3px solid var(--gold-color);
    position: relative;
    overflow: hidden;
}

footer p {
    position: relative;
    z-index: 1;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Fall-themed scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
    border-left: 1px solid var(--secondary-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
    border-radius: 6px;
    border: 2px solid var(--light-color);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--gold-color), var(--secondary-color));
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2.2em;
        padding-top: 10px;
    }
    
    nav ul {
        gap: 10px;
        margin-top: 10px;
    }
    
    nav ul li a {
        padding: 6px 15px;
        font-size: 1.1em;
    }
    
    .language-toggle {
        position: relative;
        top: auto;
        right: auto;
        margin: 10px auto;
    }
    
    .hero-section {
        padding: 60px 15px;
    }
    
    .hero-section h2 {
        font-size: 2.5em;
    }
    
    .products-section,
    .contact-section {
        padding: 25px;
    }
    
    .image-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}