/* ==========================================================================
   A&M ROYAL SOFA - MASTER STYLESHEET
   Mobile-First, Responsive Design System with HSL Theme Variables
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Borel&family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* Dynamic Theme HSL Color System */
  --primary-color: #7A0016;       /* Royal Maroon */
  --primary-hover: #5A0010;
  --accent-color: #D4AF37;        /* Gold Accent */
  --accent-hover: #B89320;
  --dark-color: #1A1E24;          /* Slate Dark */
  --light-bg: #FDFBF7;            /* Warm Cream */
  --card-bg: #FFFFFF;
  --text-main: #2C3036;
  --text-muted: #6B7280;
  --border-color: #E5E7EB;
  --success-color: #10B981;
  --warning-color: #F59E0B;
  --danger-color: #EF4444;
  
  /* Typography */
  --font-heading: 'Borello', 'Bodoni Moda', 'Playfair Display', serif;
  --font-body: 'Poppins', sans-serif;
  
  /* Layout & Spacing */
  --container-max: 1280px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 15px 35px rgba(122, 0, 22, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Basic Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--light-bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--dark-color);
  line-height: 1.2;
  margin-bottom: 0.5em;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  margin: 10px auto 0;
  border-radius: 2px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 8px auto 0;
}

/* Buttons System (Min 44px Touch Targets) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  user-select: none;
}

.btn-primary {
  background: var(--primary-color);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(122, 0, 22, 0.3);
}

.btn-accent {
  background: var(--accent-color);
  color: var(--dark-color);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.btn-whatsapp {
  background: #25D366;
  color: #FFFFFF;
}

.btn-whatsapp:hover {
  background: #1EBE5B;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: #FFFFFF;
}

.btn-sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* Announcement Top Bar */
.announcement-bar {
  background: var(--primary-color);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 20px;
  text-align: center;
  position: relative;
  z-index: 1000;
}

.announcement-bar a {
  color: var(--accent-color);
  text-decoration: underline;
  margin-left: 5px;
}

/* Top Header Bar */
.top-bar {
  background: var(--dark-color);
  color: #D1D5DB;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar-info, .top-bar-social {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Main Site Header */
.header {
  background: var(--card-bg);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-brand img {
  height: 48px;
  width: auto;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.logo-title span {
  color: var(--accent-color);
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  color: var(--text-main);
  padding: 8px 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-badge-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dark-color);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: var(--transition);
}

.icon-badge-btn:hover {
  background: #F3F4F6;
  color: var(--primary-color);
}

.badge-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--primary-color);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-trigger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--dark-color);
}

/* Mobile Drawer Menu */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--card-bg);
  z-index: 1001;
  box-shadow: -5px 0 25px rgba(0,0,0,0.15);
  transition: var(--transition);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
}

.mobile-drawer.active {
  right: 0;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

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

.drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

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

.mobile-nav-list a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-color);
}

/* Hero Slider Section */
.hero-slider-section {
  position: relative;
  background: var(--dark-color);
  color: #FFFFFF;
  overflow: hidden;
}

.hero-slide {
  min-height: 540px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  position: relative;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  position: absolute;
  inset: 0;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26,30,36,0.92) 0%, rgba(26,30,36,0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  padding: 60px 0;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: #FFFFFF;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #E5E7EB;
  margin-bottom: 32px;
}

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: var(--accent-color);
  width: 28px;
  border-radius: 10px;
}

/* Special Offer Popup Modal */
.offer-popup-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 20px;
}

.offer-popup-modal.active {
  opacity: 1;
  visibility: visible;
}

.popup-card {
  background: var(--card-bg);
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  animation: popupScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popupScale {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.popup-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0,0,0,0.5);
  color: #FFF;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

.popup-content {
  padding: 30px;
  text-align: center;
}

.popup-content h3 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 12px;
}

/* Products Grid System */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.product-card-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #F3F4F6;
}

.product-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card-thumb img {
  transform: scale(1.06);
}

.wishlist-toggle-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.9);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.wishlist-toggle-btn:hover, .wishlist-toggle-btn.active {
  color: var(--danger-color);
  background: #FFFFFF;
}

.product-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-color);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.product-title {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.product-title a:hover {
  color: var(--primary-color);
}

.product-price-row {
  margin-top: auto;
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #F3F4F6;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.quote-badge {
  background: #FEF3C7;
  color: #92400E;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Services Cards Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--card-bg);
  padding: 32px 24px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 64px;
  height: 64px;
  background: #FFF5F5;
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 20px;
}

/* Before / After Gallery Component */
.before-after-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.ba-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.ba-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}

.ba-img-wrapper {
  position: relative;
}

.ba-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.7);
  color: #FFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}

.ba-card-body {
  padding: 16px;
  text-align: center;
}

/* Responsive Embed Wrapper (16:9) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.video-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.video-embed-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
}

.video-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Back to Top Floating Button (Positioned Above WhatsApp Float) */
.back-to-top {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 989;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  border: 2px solid var(--accent-color);
  cursor: pointer;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  background: var(--primary-hover);
  box-shadow: 0 8px 20px rgba(122, 0, 22, 0.4);
}

/* Floating WhatsApp Sticky Button */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 990;
  transition: var(--transition);
  animation: pulseWhatsapp 2s infinite;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  background: #1EBE5B;
}

@keyframes pulseWhatsapp {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Footer Section */
.footer {
  background: var(--dark-color);
  color: #9CA3AF;
  padding-top: 60px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
}

.footer-col h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--accent-color);
  margin-top: 8px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .nav-menu {
    display: none;
  }
  .mobile-menu-trigger {
    display: block;
  }
  .top-bar-social {
    display: none;
  }
}

@media (max-width: 600px) {
  .header .container {
    height: 70px;
  }
  .logo-title {
    font-size: 1.25rem;
  }
  .hero-slide {
    min-height: 460px;
  }
  .floating-whatsapp {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    font-size: 1.7rem;
  }
}
