/* ==========================================================================
   THE BESTOWALS - RESPONSIVE STYLESHEET
   Flawless layout adaptation across all viewport sizes
   ========================================================================== */

/* Mobile Drawer (Hidden by default) */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 290px;
  height: 100%;
  background-color: var(--color-bg-body);
  z-index: 1001;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.mobile-drawer.active {
  transform: translateX(0);
}

.mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-light);
}

.mobile-logo {
  height: 36px;
  width: auto;
}

.mobile-drawer-close {
  font-size: 28px;
  line-height: 1;
  color: var(--color-text-dark);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-dark);
  display: block;
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: var(--color-primary-green);
  font-weight: 600;
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
}

.mobile-contact-item {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}


/* --- LAPTOP / LARGE TABLET (< 1100px) --- */
@media screen and (max-width: 1100px) {
  .hero-title-top {
    font-size: 56px;
  }

  .hero-title-main {
    font-size: 64px;
  }

  .hero-subtitle {
    font-size: 15.5px;
  }

  .product-card {
    flex: 0 0 calc((100% - 60px) / 4);
    min-width: calc((100% - 60px) / 4);
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .testimonials-slider-track {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}


/* --- TABLET (< 900px) --- */
@media screen and (max-width: 900px) {

  /* Navigation */
  .main-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Hero Section */
  .hero-section {
    min-height: 520px;
    height: 520px;
    padding: 0;
  }

  .hero-slides-wrapper {
    height: 100%;
    min-height: 520px;
  }

  .hero-slide {
    height: 100%;
    padding: 0;
    background-position: 85% center;
  }

  .hero-container {
    display: flex;
    justify-content: flex-start;
    text-align: left;
  }

  .hero-content {
    max-width: 520px;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-badges-grid {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .hero-nav-btn {
    display: flex;
    width: 38px;
    height: 38px;
  }

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

  /* Benefits Strip */
  .benefits-container {
    flex-wrap: wrap;
    gap: 16px;
  }

  .benefit-item {
    min-width: 160px;
  }

  .benefit-divider {
    display: none;
  }

  /* Gift Banner */
  .gift-banner-card {
    min-height: 380px;
    background-position: 70% center;
    background-image: linear-gradient(to right,
        rgba(47, 62, 44, 0.95) 0%,
        rgba(47, 62, 44, 0.88) 55%,
        rgba(47, 62, 44, 0.50) 100%), url('../assets/images/banners/gift-boxes.webp');
  }

  .gift-banner-content {
    max-width: 100%;
    padding: 40px 28px;
    align-items: flex-start;
    text-align: left;
  }

  .occasion-badges {
    flex-wrap: wrap;
    gap: 16px;
  }

  /* Story Section */
  .story-section {
    min-height: 440px;
    background-image: linear-gradient(to right,
        rgba(247, 237, 226, 0.90) 0%,
        rgba(247, 237, 226, 0.85) 50%,
        rgba(247, 237, 226, 0.90) 100%), url('../assets/images/story/brand-story.webp');
  }

  .story-content {
    margin-left: 0;
    max-width: 100%;
    align-items: center;
    text-align: center;
    padding: 20px 20px;
  }

  .story-pillars-grid {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  /* Newsletter */
  .newsletter-card {
    flex-direction: column;
    text-align: center;
    padding: 30px 24px;
  }

  .newsletter-content {
    flex-direction: column;
  }

  .newsletter-form {
    min-width: 100%;
    width: 100%;
  }

  .testimonial-nav-btn {
    display: none;
  }
}


/* --- MOBILE (< 768px) --- */
@media screen and (max-width: 768px) {
  :root {
    --container-padding: 16px;
    --header-height: 70px;
  }

  /* Top Bar */
  .top-bar {
    background-color: #c87a28 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    padding: 8px 12px !important;
  }

  .top-bar-left {
    justify-content: center !important;
    color: #ffffff !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .top-bar-icon {
    color: #ffffff !important;
    width: 15px !important;
    height: 15px !important;
  }

  .top-bar-right {
    display: none !important;
  }

  .top-bar-container {
    justify-content: center !important;
  }

  /* Header Layout */
  .header-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 16px !important;
    position: relative !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
    order: 1 !important;
    margin: 0 !important;
  }

  .brand-logo {
    order: 2 !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
  }

  .logo-image {
    height: 32px !important;
    width: auto !important;
  }

  .header-actions {
    order: 3 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .user-btn {
    display: none !important;
  }

  .action-btn {
    width: 32px !important;
    height: 32px !important;
  }

  .cart-badge {
    background-color: #cf7925 !important;
    color: #ffffff !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
  }

  /* Hero Section (Mobile Luxury Spec with Generated Mobile Art) */
  .hero-section {
    height: 480px;
    min-height: 480px;
    padding: 0;
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: #faf5ed;
  }

  .hero-slides-wrapper {
    height: 100%;
    min-height: 480px;
    width: 100%;
    position: relative;
    overflow: hidden;
  }

  .hero-slide {
    height: 100%;
    min-height: 480px;
    padding: 24px 16px 32px;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  }

  .hero-slide[data-slide="0"],
  .hero-slide:nth-child(1) {
    background-image: url('../assets/images/hero/hero-mobile-slide-1.webp') !important;
  }

  .hero-slide[data-slide="1"],
  .hero-slide:nth-child(2) {
    background-image: url('../assets/images/hero/hero-mobile-slide-2.webp') !important;
  }

  .hero-slide::before {
    display: none;
  }

  .hero-container {
    position: relative;
    z-index: 2;
    padding: 0 16px;
    width: 100%;
  }

  .hero-content {
    max-width: 58%;
    padding-left: 0 !important;
    margin: 0;
  }

  .hero-title-top {
    font-size: 32px;
    line-height: 1.08;
    margin-bottom: 2px;
  }

  .hero-title-main {
    font-size: 38px;
    line-height: 1.08;
    margin-bottom: 8px;
  }

  .hero-subtitle {
    font-size: 12px;
    line-height: 1.35;
    color: #483d31;
    margin-bottom: 14px;
    max-width: 240px;
  }

  .hero-badges-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px 10px !important;
    max-width: 240px;
    margin-bottom: 18px;
  }

  .hero-badge-item {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .badge-icon-box {
    width: 20px;
    height: 20px;
  }

  .custom-badge-icon,
  .badge-icon-box svg {
    width: 18px;
    height: 18px;
  }

  .badge-text {
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.15;
    color: #332b22;
  }

  .hero-cta-wrap {
    margin-top: 4px;
  }

  .hero-cta-wrap .btn {
    padding: 10px 22px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
  }

  .hero-nav-btn {
    display: none !important;
  }

  .hero-dots {
    bottom: 14px;
  }

  /* Categories (3-3 on Mobile) */
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 8px;
    margin-bottom: 24px;
  }

  .category-circle {
    width: clamp(82px, 25vw, 105px);
    height: clamp(82px, 25vw, 105px);
    padding: 8px;
    margin-bottom: 8px;
  }

  .category-name {
    font-size: 12px;
    line-height: 1.25;
  }

  /* Products Slider */
  .products-carousel-track {
    gap: 12px;
  }

  .product-card {
    flex: 0 0 calc((100% - 12px) / 2);
    min-width: calc((100% - 12px) / 2);
    padding: 10px;
  }

  .product-name {
    font-size: 12.5px;
  }

  .product-price {
    font-size: 15px;
  }

  .add-to-cart-btn {
    width: 28px;
    height: 28px;
  }

  /* Gift Banner */
  .gift-banner-title {
    font-size: 28px;
  }

  .occasion-badges {
    gap: 12px;
    flex-wrap: wrap;
  }

  .occasion-icon-wrap {
    width: 32px;
    height: 32px;
  }

  .occasion-label {
    font-size: 10.5px;
  }

  /* Story */
  .story-title {
    font-size: 30px;
  }

  .story-image-circle-wrap {
    max-width: 440px;
    width: 100%;
  }

  .story-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Testimonials */
  .testimonials-slider-track {
    grid-template-columns: 1fr;
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Benefits Strip (4 items: perfectly aligned & centered 2x2 grid on mobile) */
  .benefits-strip-section {
    padding: 22px 16px 18px !important;
    background: transparent !important;
  }

  .benefits-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 20px !important;
    width: 100% !important;
    max-width: 330px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .benefit-divider {
    display: none !important;
  }

  .benefit-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    gap: 8px !important;
    min-width: 0 !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .benefit-icon-wrap {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .benefit-icon {
    width: 22px !important;
    height: 22px !important;
    color: #5c4f3d !important;
  }

  .benefit-text-wrap {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
  }

  .benefit-title {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #241d16 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  .benefit-desc {
    font-size: 10px !important;
    font-weight: 500 !important;
    color: #4a4034 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  /* Newsletter (Mobile Spec) */
  .newsletter-section {
    padding: 10px 14px 20px !important;
  }

  .newsletter-card {
    background-color: #43533b !important;
    border-radius: 14px !important;
    padding: 20px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 14px rgba(45, 35, 20, 0.08) !important;
  }

  .newsletter-flourish {
    display: none !important;
  }

  .newsletter-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 12px !important;
    text-align: left !important;
  }

  .newsletter-icon-wrap {
    width: 36px !important;
    height: 36px !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .newsletter-icon-wrap svg {
    width: 30px !important;
    height: 30px !important;
    stroke-width: 1.5 !important;
  }

  .newsletter-title {
    font-family: var(--font-serif) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.15 !important;
  }

  .newsletter-desc {
    font-size: 10px !important;
    line-height: 1.35 !important;
    color: rgba(255, 255, 255, 0.88) !important;
    margin: 0 !important;
  }

  .newsletter-form {
    width: 100% !important;
  }

  .newsletter-input-group {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    background: #ffffff !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    padding: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
  }

  .newsletter-input {
    flex: 1 !important;
    padding: 10px 12px !important;
    font-size: 11px !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: #332b22 !important;
  }

  .newsletter-input::placeholder {
    color: #908475 !important;
  }

  .btn-newsletter-submit {
    background-color: #cf7925 !important;
    color: #ffffff !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    border: none !important;
    padding: 10px 16px !important;
    border-radius: 0 6px 6px 0 !important;
    cursor: pointer !important;
    letter-spacing: 0.5px !important;
    width: auto !important;
    text-transform: uppercase !important;
  }

  /* Footer Mobile Accordions */
  .main-footer {
    background-color: #FAF5EE !important;
    padding: 24px 14px 16px !important;
  }

  .footer-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .footer-col-brand {
    text-align: left !important;
    padding-bottom: 8px !important;
    border-bottom: none !important;
  }

  .footer-logo-img {
    width: 160px !important;
    height: auto !important;
    margin-bottom: 6px !important;
  }

  .footer-brand-desc {
    font-size: 11px !important;
    line-height: 1.4 !important;
    color: #5c5244 !important;
    margin-bottom: 12px !important;
  }

  .footer-social-links,
  .social-links {
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-start !important;
  }

  .footer-social-links .social-icon,
  .social-links .social-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: 1px solid #d5cab9 !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #443c32 !important;
    text-decoration: none !important;
  }

  .footer-social-links .social-icon svg,
  .social-links .social-icon svg {
    width: 14px !important;
    height: 14px !important;
  }

  .footer-col:not(.footer-col-brand) {
    border-bottom: 1px solid #e5dcce !important;
    padding-bottom: 6px !important;
  }

  .footer-col-title {
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #241d16 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer !important;
    padding: 6px 0 !important;
    user-select: none !important;
    margin: 0 !important;
  }

  .footer-col-title::after {
    content: '⊕' !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #8e7c65 !important;
  }

  .footer-col.expanded .footer-col-title::after {
    content: '⊖' !important;
  }

  .footer-links-list,
  .footer-contact-list {
    display: none;
    padding-top: 10px;
  }

  .footer-col.expanded .footer-links-list,
  .footer-col.expanded .footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .footer-bottom {
    background: transparent !important;
    padding: 14px 0 0 !important;
    border-top: none !important;
  }

  .footer-bottom-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    text-align: center !important;
  }

  .copyright-text {
    font-size: 10.5px !important;
    color: #7a7063 !important;
    margin: 0 !important;
  }

  .payment-methods {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  .payment-label {
    display: none !important;
  }

  .back-to-top-btn {
    position: fixed !important;
    bottom: 18px !important;
    right: 14px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background-color: #624f3b !important;
    color: #ffffff !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    z-index: 99 !important;
  }
}