/* ==========================================================================
   Baytree Florists - Main Stylesheet
   Florist in Elgin, Moray, Scotland
   ========================================================================== */

/* ==========================================================================
   Fonts & Reset
   ========================================================================== */
@font-face {
  font-family: 'Bradley Hand ITC';
  src: url('../fonts/Bradley Hand ITC.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'Moulin Light';
  src: url('../fonts/Moulin-Light-Web.woff') format('woff');
  font-display: swap;
}

body, ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

body {
  font-family: 'Moulin Light', sans-serif;
  color: #274b91;
  background: #fff;
  line-height: 1.6;
}

/* ==========================================================================
   Header - Top Bar
   ========================================================================== */
.header-bar {
  background: #FC89AC;
  color: #274b91;
  text-align: center;
  font-weight: bold;
  padding: 8px;
  font-size: 14px;
}

/* ==========================================================================
   Header - Logo & Navigation Row
   ========================================================================== */
.header-wrapper {
  position: relative;
  z-index: 1001;
}

.logo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 10px 20px;
}

.logo-left {
  flex: 1;
  display: flex;
  align-items: center;
}

.info-box {
  font-size: 12px;
  line-height: 1.2;
  color: #274b91;
  text-align: left;
  margin-right: 10px;
}

.logo-center {
  flex: 1;
  text-align: center;
  background: url('../img/tree.jpg') no-repeat center center;
  background-size: 84px 160px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.logo-right {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ==========================================================================
   Burger Menu (Mobile)
   ========================================================================== */
.burger {
  display: none;
  width: 30px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  height: 22px;
}

.burger span {
  height: 3px;
  background: #274b91;
  border-radius: 2px;
}

/* ==========================================================================
   Logo Styling
   ========================================================================== */
.logo-center .logo {
  margin: 0;
  font-family: 'Bradley Hand ITC', cursive;
  font-size: 48px;
  color: #274b91;
  line-height: 1.1;
}

.logo-center .sub-logo {
  margin: -16px 0 0;
  font-family: 'Bradley Hand ITC', cursive;
  font-size: 24px;
  color: #274b91;
}

.logo-center .phone {
  margin: 4px 0 0;
  font-size: 16px;
  color: #274b91;
}

.logo-right a {
  text-decoration: none;
  color: #274b91;
  font-size: 20px;
}

.nowrap {
  white-space: nowrap;
}

/* ==========================================================================
   Desktop Navigation
   ========================================================================== */
.main-nav .nav-menu {
  display: flex;
  justify-content: center;
  background: #fff;
}

.main-nav .nav-menu li {
  position: relative;
}

.main-nav .nav-menu li a {
  display: block;
  padding: 15px 20px;
  color: #274b91;
  text-decoration: none;
  font-size: 15px;
}

.main-nav .nav-menu .dropdown > a::after {
  content: '▼';
  margin-left: 5px;
  font-size: 12px;
}

.main-nav .nav-menu .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .3s ease, transform .3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  z-index: 1000;
}

.main-nav .nav-menu .dropdown:hover .dropdown-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.main-nav .nav-menu .dropdown-menu li a {
  padding: 10px;
  white-space: nowrap;
  color: #274b91;
}

/* Desktop dropdown highlight */
.main-nav .nav-menu .dropdown:hover > .dropdown-menu,
.main-nav .nav-menu .dropdown:focus-within > .dropdown-menu {
  background: #f7e9f1;
  transition: background 0.2s;
}

.main-nav .nav-menu .dropdown-menu li:hover,
.main-nav .nav-menu .dropdown-menu li:focus-within {
  background: #f2d8e9;
}

/* ==========================================================================
   Mobile Navigation
   ========================================================================== */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  transform: translateX(-100%);
  transition: transform .3s ease;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  overflow: hidden;
  z-index: 1000;
  height: 600px;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav .nav-level {
  width: 100%;
  transition: transform .3s ease;
}

.mobile-nav .nav-level.root {
  position: relative;
  transform: translateX(0);
}

.mobile-nav .nav-level.sub {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateX(100%);
}

.mobile-nav li a {
  display: block;
  padding: 14px 16px;
  color: #274b91;
  text-decoration: none;
  border-bottom: 1px solid #eee;
}

.mobile-nav li[data-has] > a::after {
  content: '›';
  float: right;
}

.mobile-nav .back-btn {
  display: block;
  padding: 14px 16px;
  font-weight: bold;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  aspect-ratio: 16 / 5;
  width: 100%;
  overflow: hidden;
  display: block;
  background: #fff;
  position: relative;
}

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

/* ==========================================================================
   Shopping Cart Badge
   ========================================================================== */
.cart-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  background: #e74894;
  color: #fff;
  font-size: 15px;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(230, 72, 148, 0.17);
  z-index: 10;
}

/* ==========================================================================
   Welcome Section
   ========================================================================== */
.welcome {
  text-align: center;
  padding: 20px;
}

.three-images {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px;
}

.image-block {
  margin: 10px;
  text-align: center;
}

.image-block img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
}

/* ==========================================================================
   Call-to-Action Button
   ========================================================================== */
.flowerbutton {
  display: block;
  width: 70%;
  background: #FC89AC;
  color: #fff;
  border: none;
  border-radius: 15px;
  padding: 17px 0;
  font-size: 1.25rem;
  font-family: 'Moulin Light', sans-serif;
  font-weight: bold;
  margin-top: 22px;
  box-shadow: 0 2px 14px rgba(220, 80, 140, 0.13);
  letter-spacing: .06em;
  cursor: pointer;
  transition: background 0.17s, color 0.17s;
  margin: auto;
  margin-top: 20px;
  text-decoration: none;
}

.flowerbutton:hover {
  background: #e74894;
}

/* ==========================================================================
   Contact Bar
   ========================================================================== */
.contact-bar {
  background: #FC89AC;
  color: #274b91;
  font-weight: bold;
  text-align: center;
  font-size: 20px;
  padding: 14px 0 14px 0;
  letter-spacing: .02em;
  box-shadow: 0 -1px 14px rgba(220, 80, 140, 0.13);
  margin-bottom: 0;
  border-radius: 0;
}

.contact-bar a {
  background: #e74894;
  color: #fff;
  border-radius: 22px;
  padding: 8px 26px;
  text-decoration: none;
  margin-left: 22px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(230, 72, 148, 0.09);
  transition: background 0.18s;
  white-space: nowrap !important;
}

.contact-bar a:hover {
  background: #d13d7f;
}

/* ==========================================================================
   Social Media Row
   ========================================================================== */
.social-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin: 36px 0 18px 0;
}

.social-row a img {
  display: inline-block;
  width: 73px;
  height: 73px;
  transition: transform 0.15s;
}

.social-row a:hover img,
.social-row a:focus img {
  transform: scale(1.08) rotate(-8deg);
  box-shadow: 0 4px 18px rgba(252,137,172,0.18);
}

/* ==========================================================================
   Footer Social Row
   ========================================================================== */
.footer-social-row {
  position: relative;
  width: 100%;
  min-height: 73px;
  margin: 36px 0 18px 0;
  display: flex;
  align-items: center;
}

.footer-badge {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.footer-badge img {
  max-width: 100px;
  width: 18vw;
  height: auto;
  border-radius: 50%;
  background: #fff;
  margin-left: 15px;
}

.footer-social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  width: 100%;
}

.footer-social-icons a img {
  display: inline-block;
  max-width: 73px;
  width: 18vw;
  height: auto;
  transition: transform 0.15s;
}

.footer-social-icons a:hover img,
.footer-social-icons a:focus img {
  transform: scale(1.08) rotate(-8deg);
  box-shadow: 0 4px 18px rgba(252,137,172,0.18);
}

/* ==========================================================================
   Footer Links
   ========================================================================== */
.footer-links {
  margin-bottom: 8px;
  font-size: 14px;
  text-align: center;
  line-height: 1.8;
  color: #274b91;
}

.footer-links a {
  color: #274b91;
  text-decoration: underline;
}

.footer-links a:hover {
  color: #e74894;
}

.footer-links-row {
  display: inline-block;
  margin-bottom: 2px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: #FC89AC;
  color: #274b91;
  text-align: center;
  padding: 10px;
  font-weight: bold;
  font-size: 14px;
}

/* ==========================================================================
   Products Grid
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto 32px auto;
}

.product-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(220,80,140,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.16s;
  position: relative;
}

.product-card:hover {
  box-shadow: 0 8px 28px rgba(252,137,172,0.13);
}

.product-img {
  transition: transform 0.18s cubic-bezier(.4,.2,.5,1), box-shadow 0.18s;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #f6f6f6;
  object-fit: cover;
  display: block;
}

.product-card:hover .product-img,
.product-card:focus-within .product-img {
  transform: scale(1.07);
  box-shadow: 0 8px 32px rgba(220,80,140,0.10);
}

.product-info {
  padding: 14px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.product-title {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 7px;
  color: #274b91;
  min-height: 40px;
}

.product-price {
  color: #e74894;
  font-size: 18px;
  font-weight: bold;
  margin-right: 10px;
}

.out-of-stock {
  color: #fff;
  background: #FC89AC;
  font-size: 15px;
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: bold;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
}

/* ==========================================================================
   Search Overlay
   ========================================================================== */
#searchOverlay {
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.search-overlay-content {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 2rem 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  text-align: center;
}

.search-overlay-content input[type="text"] {
  width: 250px;
  font-size: 1.1rem;
  padding: 0.5em 0.75em;
  margin-right: 0.5em;
  border: 1px solid #ccc;
  border-radius: 0.5em;
}

.search-overlay-content button[type="submit"] {
  background: #e74894;
  color: #fff;
  border: none;
  border-radius: 0.5em;
  padding: 0.5em 1.1em;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.search-overlay-content button[type="submit"]:hover {
  background: #c83477;
}

.search-close-btn {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: #555;
  cursor: pointer;
}

/* ==========================================================================
   Featured Products Section Title
   ========================================================================== */
.featured-title {
  text-align: center;
  color: #e74894;
  font-family: 'Bradley Hand ITC', cursive;
  font-size: 2.1rem;
  margin: 32px 0 16px 0;
}

/* ==========================================================================
   Media Queries - Tablet
   ========================================================================== */
@media (max-width: 1280px) {
  .main-nav .nav-menu {
    flex-wrap: wrap;
  }
  
  .main-nav .nav-menu .dropdown-menu {
    border: 2px solid #ddd;
  }
}

/* ==========================================================================
   Media Queries - Mobile
   ========================================================================== */
@media (max-width: 768px) {
  .main-nav .nav-menu {
    display: none;
  }
  
  .burger {
    display: flex;
  }
  
  .info-box {
    display: none;
  }
  
  .tree-icon {
    display: none;
  }
  
  .logo-right {
    justify-content: center;
    width: 100%;
    margin-top: 10px;
  }
  
  .logo-center {
    background-position: center top;
    justify-content: center;
  }
  
  .logo-center .phone {
    margin-top: 17px;
  }
}

@media (min-width: 769px) {
  .mobile-nav {
    display: none;
  }
  
  .logo-left {
    justify-content: center;
  }
  
  .logo-right {
    justify-content: center;
  }
  
  .logo-center {
    background: none;
    min-height: auto;
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }
  
  .logo-center .tree-icon {
    width: 84px;
    height: 160px;
    object-fit: contain;
    margin-right: 12px;
  }
  
  .logo-center > div {
    text-align: center;
  }
}

@media (max-width: 1000px) {
  .products-grid {
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
  }
}

@media (max-width: 700px) {
  .products-grid {
    gap: 16px;
    padding-left: 5vw;
    padding-right: 5vw;
  }
  
  .footer-links-row {
    display: block;
    margin-bottom: 7px;
  }
}

/* ==========================================================================
   Media Queries - Small Mobile
   ========================================================================== */
@media (max-width: 600px) {
  .search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    width: 100%;
  }
  
  .search-overlay-content input[type="text"],
  .search-overlay-content button[type="submit"] {
    width: 100%;
    margin-right: 0;
    box-sizing: border-box;
  }
  
  .logo-right {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
  .logo-right a {
    width: 100%;
    justify-content: center;
    display: flex;
  }
  
  .flowerbutton {
    width: 90%;
  }
  
  .footer-social-row {
    flex-direction: column;
    min-height: auto;
    margin: 22px 0 8px 0;
    align-items: stretch;
  }
  
  .footer-badge {
    position: static;
    transform: none;
    justify-content: center;
    margin-bottom: 7px;
    width: 100%;
  }
  
  .footer-social-icons {
    justify-content: center;
    flex-wrap: wrap;
    gap: 13px;
  }
  
  .footer-social-icons a img,
  .footer-badge img {
    max-width: 60px;
    width: 26vw;
    margin-bottom: 4px;
  }
}
