/* =============================================================================
   HOME COMPONENTS UNIFIED STYLES
   Centralized styling for all home page components
   ============================================================================= */

/* =============================================================================
   GLOBAL VARIABLES & UTILITIES
   ============================================================================= */
:root {
  --primary-color: #ff7f50;
  --secondary-color: #fdcb6e;
  --accent-color: #fd79a8;
  --gradient-primary: linear-gradient(90deg, #ff7f50 30%, #fdcb6e 100%);
  --gradient-secondary: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
  --gradient-background: linear-gradient(120deg, #fff8f0 60%, #ffeaa7 100%);
  --card-radius: 1rem;
  --card-img-height: 250px;
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 20px 40px rgba(253, 121, 168, 0.15);
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s ease;
  --transition-slow: all 0.5s ease;
}

/* Common gradient text */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Common badge styling */
.badge {
  font-size: 0.9rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,193,7,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(255,193,7,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,193,7,0); }
}

/* =============================================================================
   HERO SECTION
   ============================================================================= */
.hero-section {
  background: var(--gradient-background);
  position: relative;
}

.hero-section .text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-img {
  box-shadow: 0 8px 32px 0 rgba(253,121,168,0.15), 0 1.5px 8px 0 rgba(0,0,0,0.04);
  border: 4px solid #fff;
  transition: var(--transition-normal);
  border-radius: 20px !important;
  max-width: 100%;
  min-width: 180px;
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.hero-img:hover {
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 0 15px 45px 0 rgba(253,121,168,0.20);
}

/* Carousel Styles */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 20px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Carousel Indicators */
.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
  flex-wrap: nowrap;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition-normal);
  border: 2px solid #fff;
  flex-shrink: 0;
  display: block;
  box-sizing: border-box;
}

.indicator.active {
  background: #fdcb6e;
  transform: scale(1.2);
}

.indicator:hover {
  background: #ff7f50;
  transform: scale(1.1);
}

/* Hero Buttons */
.hero-section .btn-danger {
  background: linear-gradient(45deg, #ff7f50, #fdcb6e);
  border: none;
  box-shadow: 0 4px 15px 0 rgba(253,121,168,0.3);
}

.hero-section .btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(253,121,168,0.4);
}

.hero-section .btn-outline-warning {
  background: #fff;
  border: 2px solid #fdcb6e;
  color: #fdcb6e;
  font-weight: 600;
}

.hero-section .btn-outline-warning:hover {
  background: #fdcb6e;
  color: #fff;
  transform: translateY(-2px);
}

/* Floating elements animation */
.hero-image-container {
  position: relative;
}

.floating-element {
  position: absolute;
  font-size: 2rem;
  animation: float 3s ease-in-out infinite;
  opacity: 0.8;
}

.floating-element-1 {
  top: 10%;
  right: -10%;
  animation-delay: 0s;
}

.floating-element-2 {
  bottom: 15%;
  left: -15%;
  animation-delay: 1s;
}

.floating-element-3 {
  top: 60%;
  right: -5%;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

/* =============================================================================
   PRODUCTS SECTION
   ============================================================================= */
.products-compact-section {
  background: var(--gradient-background);
  position: relative;
}

.products-compact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 15% 85%, rgba(253,121,168,0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(253,203,110,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.section-header {
  padding: 1rem 0;
  border-bottom: 2px solid rgba(253,121,168,0.1);
  margin-bottom: 1.5rem;
}

.product-compact-card {
  background: #fff;
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition-normal);
  border: 1px solid #f1f1f1;
  position: relative;
}

.product-compact-card:hover, .product-compact-card:focus {
  box-shadow: 0 15px 40px 0 rgba(253,121,168,0.25);
  border-color: #ff7f50;
  transform: translateY(-8px) scale(1.05);
  z-index: 2;
}

.product-compact-card:hover .product-quick-order {
  opacity: 1;
  transform: translateY(0);
}

.product-quick-order {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  opacity: 0;
  transform: translateY(-10px);
  transition: var(--transition-normal);
}

.product-quick-order .btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  box-shadow: 0 4px 15px rgba(253,121,168,0.3);
}

/* Hide overlay button on mobile, show on larger screens */
@media (max-width: 767px) {
  .product-quick-order {
    display: none !important;
  }
}

/* Mobile action button styles */
.product-mobile-action {
  border-top: 1px solid #f8f9fa;
}

.product-mobile-action .btn {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: var(--transition-fast);
}

.product-mobile-action .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-compact-img-wrapper {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, #fff8f0 0%, #ffeaa7 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-compact-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 1.2rem;
  border-top-right-radius: 1.2rem;
  transition: transform 0.3s ease;
}

.product-compact-card:hover .product-compact-img {
  transform: scale(1.1);
}

.product-compact-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff8f0 0%, #ffeaa7 100%);
  color: #fdcb6e;
  font-size: 2rem;
}

.product-compact-badge-hot, .product-compact-badge-featured {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 4;
  font-size: 0.8rem;
  padding: 0.4em 0.8em;
  border-radius: 1rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.product-compact-body {
  padding: 1rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-top: 1px solid rgba(253,121,168,0.1);
  background: #fff;
}

.product-compact-title {
  color: #2d3748;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.product-compact-category {
  color: #ff7f50;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: capitalize;
}

.product-compact-pricing {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0.3rem;
}

.product-compact-pricing .text-primary {
  color: #ff7f50 !important;
}

/* =============================================================================
   PRODUCT MODAL STYLES
   ============================================================================= */
#productModal .modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

#productModal .modal-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 20px 20px 0 0;
}

.product-gallery-modal .main-image-modal {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid #e9ecef;
  transition: var(--transition-normal);
}

.product-gallery-modal .main-image-modal:hover {
  border-color: #dee2e6;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.product-thumb-modal {
  border: 2px solid transparent;
  transition: var(--transition-normal);
  border-radius: 8px;
}

.product-thumb-modal:hover {
  border-color: #0d6efd;
  transform: scale(1.05);
}

.product-thumb-modal.active {
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.price-section-modal {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.variants-section-modal .btn {
  transition: var(--transition-normal);
}

.variants-section-modal .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.purchase-section-modal {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.quantity-wrapper-modal .input-group .btn {
  border-color: #dee2e6;
}

.quantity-wrapper-modal .input-group .form-control {
  border-left: none;
  border-right: none;
  font-weight: 600;
}

.image-nav-arrows .btn {
  width: 40px;
  height: 40px;
  opacity: 0.8;
  transition: var(--transition-normal);
}

.image-nav-arrows .btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* =============================================================================
   NEWSLETTER SECTION
   ============================================================================= */
.newsletter-signup-section {
  background: var(--gradient-secondary);
  position: relative;
  overflow: hidden;
}

.newsletter-signup-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 75%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 25%, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.newsletter-signup-section .text-gradient {
  background: linear-gradient(90deg, #fff 30%, #ffeaa7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.newsletter-card {
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  transition: var(--transition-normal);
}

.newsletter-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(253,121,168,0.3) !important;
}

.benefits-list {
  flex-wrap: wrap;
  gap: 1rem;
}

.benefit-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.1);
  border-radius: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  transition: var(--transition-normal);
}

.benefit-item:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

#newsletter-signup .input-group-text {
  border-radius: 2rem 0 0 2rem !important;
  border-right: none !important;
}

#newsletter-signup .newsletter-form input[type="email"] {
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  transition: var(--transition-normal);
}

.newsletter-form input[type="email"]:focus {
  box-shadow: 0 0 0 0.25rem rgba(253,121,168,0.25);
  border-color: #fd79a8;
}

.newsletter-form input[type="email"]:focus + .input-group-text {
  border-color: #fd79a8;
}

.btn-gradient {
  background: linear-gradient(45deg, #fd79a8, #fdcb6e);
  color: #fff;
  border: none;
  transition: var(--transition-normal);
  box-shadow: 0 6px 20px rgba(253,121,168,0.3);
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255,255,255,0.2), transparent);
  transition: var(--transition-slow);
}

.btn-gradient:hover::before {
  left: 100%;
}

.btn-gradient:hover, .btn-gradient:focus {
  background: linear-gradient(45deg, #fdcb6e, #fd79a8);
  box-shadow: 0 8px 25px rgba(253,121,168,0.4);
  transform: translateY(-2px) scale(1.02);
  color: #fff;
}

/* =============================================================================
   GOOGLE MAP SECTION
   ============================================================================= */
.google-map-section {
  background: linear-gradient(135deg, #fff8f0 0%, #ffeaa7 15%, #fff8f0 100%);
  position: relative;
  overflow: hidden;
}

.google-map-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(253, 121, 168, 0.03) 0%, transparent 50%);
  animation: floating 20s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-20px, -10px) rotate(1deg); }
  66% { transform: translate(10px, -20px) rotate(-1deg); }
}

.map-container {
  position: relative;
  transition: transform 0.3s ease;
}

.map-container:hover {
  transform: scale(1.02);
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.map-container:hover .map-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.map-container:hover .overlay-content {
  transform: translateY(0);
}

.info-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(253, 121, 168, 0.1);
  transition: var(--transition-normal);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy) !important;
}

.icon-circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.info-item {
  transition: transform 0.2s ease;
}

.info-item:hover {
  transform: translateX(5px);
}

.service-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(253, 203, 110, 0.2);
  transition: var(--transition-normal);
  cursor: pointer;
}

.service-card:hover {
  background: linear-gradient(135deg, #ff7f50 0%, #fdcb6e 100%);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(253, 121, 168, 0.3);
}

.service-card:hover i {
  color: white !important;
  transform: scale(1.1);
}

.service-card:hover .text-muted {
  color: rgba(255, 255, 255, 0.8) !important;
}

.action-buttons .btn {
  transition: var(--transition-normal);
}

.action-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* =============================================================================
   ALERT STYLES
   ============================================================================= */
.alert {
  border-radius: 1rem;
  border: none;
}

.alert-success {
  background: linear-gradient(45deg, rgba(40,167,69,0.1), rgba(40,167,69,0.05));
  color: #28a745;
  border-left: 4px solid #28a745;
}

.alert-danger {
  background: linear-gradient(45deg, rgba(220,53,69,0.1), rgba(220,53,69,0.05));
  color: #dc3545;
  border-left: 4px solid #dc3545;
}

/* =============================================================================
   CART COUNTER ANIMATION
   ============================================================================= */
.animate__pulse {
  animation: pulse 0.6s ease-in-out;
}

/* Loading Animation */
.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* =============================================================================
   RESPONSIVE BREAKPOINTS
   ============================================================================= */

/* Large screens (desktop) */
@media (max-width: 991.98px) {
  .hero-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  
  .hero-img {
    max-width: 320px;
    height: 280px;
  }
  
  .hero-carousel {
    height: 280px;
  }
  
  .floating-element {
    font-size: 1.5rem;
  }
  
  .carousel-indicators {
    bottom: 15px;
    gap: 8px;
  }
  
  .indicator {
    width: 10px;
    height: 10px;
    border-width: 1.5px;
  }
  
  .product-compact-img-wrapper {
    height: 200px;
  }
  
  .benefits-list {
    justify-content: center;
    margin-bottom: 2rem;
  }
  
  .benefit-item {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
  
  .newsletter-card {
    margin: 0 1rem;
  }
  
  #productModal .modal-dialog {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }
  
  .product-gallery-modal .main-image-modal {
    padding: 1rem;
  }
  
  #productModal .modal-body {
    padding: 1rem;
  }
}

/* Medium screens (tablet) */
@media (max-width: 767px) {
  #productModal .modal-xl {
    max-width: 95%;
  }
  
  .product-thumb-modal {
    width: 50px !important;
    height: 50px !important;
  }
  
  .image-nav-arrows .btn {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
  }
  
  .map-container iframe {
    height: 300px;
  }
  
  .info-card {
    margin-top: 2rem;
  }
  
  .service-card {
    margin-bottom: 1rem;
  }
}

/* Small screens (mobile) */
@media (max-width: 575.98px) {
  :root {
    --card-img-height: 200px;
  }
  
  .hero-section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  
  .hero-img {
    max-width: 90vw;
    height: 250px;
  }
  
  .hero-carousel {
    height: 250px;
  }
  
  .hero-section h1 {
    font-size: 2.1rem;
  }
  
  .floating-element {
    display: none;
  }
  
  .position-absolute.top-0.end-0,
  .position-absolute.bottom-0.start-0 {
    display: none;
  }
  
  .carousel-indicators {
    bottom: 12px;
    gap: 6px;
  }
  
  .indicator {
    width: 8px;
    height: 8px;
    border-width: 1px;
    border-radius: 50%;
  }
  
  .indicator.active {
    transform: scale(1.3);
  }
  
  .indicator:hover {
    transform: scale(1.2);
  }
  
  .product-compact-img-wrapper {
    height: 180px;
  }
  
  .benefits-list {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .benefit-item {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }
  
  .newsletter-card {
    margin: 0;
    padding: 1.5rem !important;
  }
  
  
  
}

/* Extra small screens */
@media (max-width: 380px) {
  .carousel-indicators {
    bottom: 10px;
    gap: 5px;
  }
  
  .indicator {
    width: 7px;
    height: 7px;
    border-width: 1px;
    border-radius: 50%;
  }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */
@media print {
  .floating-element,
  .carousel-indicators,
  .image-nav-arrows,
  .product-quick-order,
  .product-mobile-action {
    display: none !important;
  }
}