/*
Theme Name: Custom_bees
Theme URI:
Author: Dubisek
Author URI:
Description: A clean, modern theme for a small beekeeping business. Features hero, about, products, and contact sections with dark mode support.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bees
*/

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg:        #ffffff;
  --color-bg-alt:    #f8f6f2;
  --color-text:      #1a1a1a;
  --color-text-muted:#5a5a5a;
  --color-accent:    #d4840a;
  --color-accent-dark: #a8660a;
  --color-border:    #e4ddd4;

  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;

  --radius: 8px;
  --transition: 0.25s ease;

  --section-padding: 5rem 0;
  --container-max: 1100px;
  --container-pad: 1.5rem;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   UTILITIES
   ========================================================= */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding: var(--section-padding);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.25;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn:hover,
.btn:focus-visible {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  outline: none;
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
  overflow: visible;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo-img {
  height: 88px;
  width: auto;
  display: block;
  position: relative;
  z-index: 101;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav__links {
  display: flex;
  gap: 2.5rem;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--color-accent);
}

/* Theme FAB — fixed bottom right */
.theme-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-text-muted);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  transition: color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.theme-fab:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.theme-fab svg {
  width: 18px;
  height: 18px;
}

/* Icon visibility — swap on theme */
.theme-fab .icon-sun  { display: none; }
.theme-fab .icon-moon { display: block; }

[data-theme="dark"] .theme-fab .icon-sun  { display: block; }
[data-theme="dark"] .theme-fab .icon-moon { display: none; }

/* =========================================================
   DARK MODE
   ========================================================= */
[data-theme="dark"] {
  --color-bg:         #16120e;
  --color-bg-alt:     #1e1a15;
  --color-text:       #ede6d9;
  --color-text-muted: #8c7d6a;
  --color-border:     #2e2620;
}

[data-theme="dark"] .site-header {
  background: rgba(22, 18, 14, 0.96);
}

[data-theme="dark"] .product-tab.is-active {
  background: #261f16;
}

[data-theme="dark"] .footer {
  background: #0e0c09;
  color: rgba(237, 230, 217, 0.45);
}

/* Burger (hidden on desktop) */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Burger open state */
.nav__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 640px) {
  .nav__burger {
    display: flex;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links li {
    text-align: center;
    padding: 0.75rem 0;
  }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  line-height: 0;
}

.hero__img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* =========================================================
   ABOUT
   ========================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__image-placeholder {
  background: linear-gradient(135deg, #f0e6d3, #d4b896);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
}

@media (max-width: 768px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__image-wrap {
    order: -1;
  }
}

/* =========================================================
   PRODUCTS
   ========================================================= */
.products__layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
  align-items: start;
}

/* Left: tab list */
.products__list {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
}

.product-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition), border-color var(--transition);
}

.product-tab:last-child {
  border-bottom: none;
}

.product-tab:hover {
  background: var(--color-bg-alt);
}

.product-tab.is-active {
  border-left-color: var(--color-accent);
  background: #fffbf5;
}

.product-tab__name {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.product-tab.is-active .product-tab__name {
  color: var(--color-accent);
}

.product-tab__arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-border);
  transition: color var(--transition), transform var(--transition);
}

.product-tab.is-active .product-tab__arrow {
  color: var(--color-accent);
  transform: translateX(3px);
}

/* Right: detail panel */
.products__detail {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transform-origin: top center;
}

.product-detail__image {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  display: block;
}

.product-detail__image--placeholder {
  width: 100%;
  aspect-ratio: 16 / 7;
}

.product-detail__body {
  padding: 1.5rem;
}

.product-detail__body h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.product-detail__body p {
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.product-detail__availability {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.product-detail__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.product-detail__dot--available   { background: #22c55e; }
.product-detail__dot--limited     { background: #f59e0b; }
.product-detail__dot--unavailable { background: #ef4444; }

/* Unroll animation */
@keyframes unroll {
  from {
    clip-path: inset(0 0 100% 0 round var(--radius));
    opacity: 0.6;
  }
  to {
    clip-path: inset(0 0 0% 0 round var(--radius));
    opacity: 1;
  }
}

.products__detail.is-animating {
  animation: unroll 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@media (max-width: 768px) {
  .products__layout {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact__details {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact__details li {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact__form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: -0.5rem;
}

.contact__form input,
.contact__form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(212, 132, 10, 0.15);
}

.contact__form .btn {
  align-self: flex-start;
}

@media (max-width: 768px) {
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.6);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
}
