/* Custom styles for ПРОМ-РУ with Bootstrap 5 */

:root {
  --bs-primary: #3785c5;
  --bs-primary-rgb: 55, 133, 197;
  --bs-dark: #25323c;
  --bs-body-font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --bs-body-color: #25323c;
  --max-page-width: 1824px;
}

body {
  font-family: var(--bs-body-font-family);
  color: var(--bs-body-color);
  max-width: var(--max-page-width);
  margin: 0 auto;
}

.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #2a6aa0;
  border-color: #2a6aa0;
}

/* Max page width */
header,
main,
footer {
  max-width: var(--max-page-width);
  margin-left: auto;
  margin-right: auto;
}

/* Header styles */
.social-icon {
  width: 50px;
  height: 50px;
  background: var(--bs-dark);
}

.phone-numbers span {
  white-space: nowrap;
}

.navbar {
  border-radius: 24px 24px 0 0;
}

/* Hero section */
.hero-section {
  background-size: cover;
  background-position: center;
  min-height: 450px;
  border-radius: 0 0 24px 24px;
  padding-left: 3rem;
  padding-right: 3rem;
}

.hero-section h1 {
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  font-size: 2.5rem;
}

.cart-widget {
  background: rgba(255, 255, 255, 0.98) !important;
}

/* Product cards */
.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 24px;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

.btn-add {
  width: 48px;
  height: 48px;
  font-size: 28px;
  line-height: 1;
  padding: 0;
  background: linear-gradient(141.33deg, #3785c5, #1a405f);
  border: none;
}

.btn-add:hover {
  background: linear-gradient(141.33deg, #2a6aa0, #152e45);
}

/* About section image */
.about-image-wrapper {
  aspect-ratio: 1/1;
}

/* Navigation */
.navbar-nav {
  width: 100%;
}

.navbar-nav .nav-item {
  flex: 1;
  text-align: center;
}

.navbar-nav .nav-link {
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  display: block;
  width: 100%;
}

.navbar-nav .dropdown-menu {
  border-radius: 8px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border: none;
}

.navbar-nav .dropdown-item {
  padding: 0.5rem 1.5rem;
  transition: background-color 0.2s ease;
}

.navbar-nav .dropdown-item:hover {
  background-color: var(--bs-primary);
  color: white;
}

@media (min-width: 992px) {
  .navbar-nav {
    justify-content: space-between;
  }

  .navbar-nav .dropdown:hover .dropdown-menu {
    display: block;
  }
  
  .navbar-nav .dropdown-menu {
    margin-top: 0;
  }
}

@media (max-width: 991.98px) {
  .navbar-nav .nav-link {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Footer */
footer {
  background: linear-gradient(65deg, #3785C5, #1B405F) !important;
  border-radius: 1rem 1rem 0 0 !important;
}

.footer-logo-wrapper {
  border-radius: 24px;
  display: inline-block;
}

footer a:hover {
  color: #f8f9fa !important;
}

/* Responsive typography */
@media (max-width: 767.98px) {
  .hero-section {
    min-height: 350px;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-section h1 {
    font-size: 1.5rem;
  }

  .cart-widget {
    max-width: 100%;
  }

  .product-card .card-title {
    font-size: 0.9rem;
  }

  .btn-add {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-section {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }
}

/* Custom scrollbar (optional) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--bs-primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a6aa0;
}

/* Utility classes */
.rounded-3 {
  border-radius: 0 0 1rem 1rem !important;
}

.rounded-3 {
  border-radius: 1rem !important;
}

.rounded-4-c {
  border-radius: 0 0 1rem 1rem !important;
}

.shadow-sm {
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.075) !important;
}
