/* ======================================================================================================================= */
/* LAYOUT PAGE SPECIFIC STYLES
/* Chỉ chứa CSS riêng cho layout_page.html, không trùng lặp với main_style.css
/* ====================================================================================================================== */

/* ============================================
   1. HEADER COMPONENTS
   ============================================ */

/* --- Toolbar Section --- */
.toolbar-section {
  background-color: #f1f9ff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toolbar-link {
  text-decoration: none;
  transition: transform 0.3s ease;
}

.toolbar-link:hover {
  transform: scale(1.05);
}

.toolbar-link span {
  transition: font-size 0.3s ease, letter-spacing 0.3s ease;
}

.toolbar-link:hover span {
  font-size: 1.3rem;
  letter-spacing: 1px;
}

.toolbar-icon {
  width: 32px;
  height: 32px;
  margin-right: 8px;
}

.toolbar-icon-small {
  width: 20px;
  height: 20px;
}

/* --- Search Bar --- */
.search-bar-wrapper {
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.search-bar-wrapper .form-control:focus {
  box-shadow: none;
  border-color: #0077b6;
  outline: none;
}

/* --- Auth Buttons --- */
.login-btn {
  color: #03516a;
  border-color: #0d6efd;
  transition: all 0.3s ease;
  font-weight: 600;
}

.login-btn:hover {
  background-color: #0077b6;
  color: white !important;
  border-color: #0077b6;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 119, 182, 0.3);
}

/* --- Cart Button --- */
.btn-cart-custom {
  background-color: #bae7ff;
  border: 1px solid #0096c7;
  color: #03516a;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.btn-cart-custom:hover {
  background-color: #90e0ef;
  border-color: #0077b6;
  color: #023e54;
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* --- Brand Section --- */
.brand-section {
  background-color: white;
  border-bottom: 1px solid #e9ecef;
}

.brand-section .col-md-7 > div {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   2. NAVIGATION
   ============================================ */

/* --- Main Navbar --- */
.main-navbar {
  background-color: white;
  border-top: 2px solid #b8ddfd;
  border-bottom: 2px solid #b8ddfd;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.main-navbar .nav-link {
  color: #0077b6;
  font-weight: 600;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.main-navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: #f6b000;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-navbar .nav-link:hover::after,
.main-navbar .nav-link.active::after {
  width: 80%;
}

.main-navbar .nav-link:hover {
  color: #00457a;
  background-color: #f1f9ff;
}

.main-navbar .nav-link.active {
  color: #00457a;
  font-weight: 700;
}

/* --- Dropdown Menu --- */
.dropdown-menu {
  border-radius: 8px;
  border: 2px solid #0077b6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 0;
}

.dropdown-item {
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: #0077b6;
  color: white;
  transform: translateX(5px);
}

/* Desktop hover for dropdown */
@media (min-width: 992px) {
  .main-navbar .dropdown:hover .dropdown-menu {
    display: block;
  }
}

/* ============================================
   3. FOOTER
   ============================================ */

.site-footer {
  background: linear-gradient(135deg, #0077b6 0%, #00457a 100%);
  color: white;
  min-height: 450px;
  padding: 3rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.site-footer a {
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.site-footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #f6b000;
  transition: width 0.3s ease;
}

.site-footer a:hover::after {
  width: 100%;
}

.site-footer a:hover {
  color: #bae7ff;
}

.footer-logo-wrapper {
  background: white;
  padding: 10px;
  border-radius: 12px;
  display: inline-block;
}

.footer-logo {
  height: 100px;
  width: auto;
}

.footer-icon {
  width: 28px;
  height: 28px;
  margin-right: 12px;
  filter: brightness(0) invert(1);
}

.company-details p {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.footer-hr {
  border-color: rgba(255, 255, 255, 0.3);
  margin: 2rem 0;
}

.footer-hours {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   4. RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Tablet - 992px */
@media (max-width: 992px) {
  .toolbar-section {
    padding: 0.8rem 0;
  }
  
  .toolbar-section .container {
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center !important;
  }
  
  .search-bar-wrapper {
    max-width: 100%;
    min-width: 200px;
    order: 3;
    flex: 1 1 100%;
  }
  
  .main-navbar .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .brand-section .col-md-7 > div {
    padding: 1.5rem;
  }
  
  .brand-section img {
    max-height: 60px;
  }
  
  /* Navbar collapse */
  .main-navbar .navbar-collapse {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 0.5rem;
  }
  
  .main-navbar .navbar-nav {
    gap: 0;
  }
  
  .main-navbar .nav-link::after {
    display: none;
  }
  
  /* Footer */
  .site-footer .row {
    gap: 1.5rem;
  }
  
  .site-footer .col-lg-4,
  .site-footer .col-lg-2,
  .site-footer .col-lg-3 {
    flex: 0 0 100%;
    max-width: 100%;
    text-align: center;
  }
  
  .company-details {
    text-align: left;
  }
}

/* Tablet nhỏ - 768px */
@media (max-width: 768px) {
  /* Toolbar - Căn giữa tất cả */
  .toolbar-section {
    padding: 0.8rem 0;
  }
  
  .toolbar-section .container {
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.8rem;
  }
  
  .toolbar-section .d-flex.align-items-center.gap-3 {
    justify-content: center;
    width: 100%;
  }
  
  .toolbar-section .d-flex.align-items-center.gap-2 {
    justify-content: center;
    width: 100%;
  }
  
  .toolbar-link {
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
  }
  
  .toolbar-link span {
    font-size: 0.85rem;
  }
  
  .toolbar-link:hover span {
    font-size: 0.9rem;
  }
  
  .toolbar-icon {
    width: 32px;
    height: 32px;
    margin-right: 0;
  }
  
  .login-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  
  .btn-cart-custom {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  
  .btn-cart-custom span {
    display: inline;
  }
  
  .search-bar-wrapper {
    min-width: 100%;
    max-width: 100%;
    order: 3;
  }
  
  .search-bar-wrapper .form-control {
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
  }
  
  /* Brand Section - Logo to, căn giữa, text nhỏ hơn */
  .brand-section {
    padding: 1rem 0;
  }
  
  .brand-section .container-fluid {
    padding: 0;
  }
  
  .brand-section .row {
    flex-direction: column;
    align-items: center;
  }
  
  .brand-section .col-md-5 {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
  }
  
  .brand-section .col-md-5 img {
    max-height: 100px !important;
    width: auto;
  }
  
  .brand-section .col-md-7 {
    width: 100%;
  }
  
  .brand-section .col-md-7 > div {
    padding: 1rem 1.5rem;
    text-align: center;
    align-items: center;
  }
  
  .brand-section .col-md-7 h1 {
    font-size: 1.4rem !important;
    margin-bottom: 0.3rem !important;
  }
  
  .brand-section .col-md-7 p {
    font-size: 1rem !important;
    margin-bottom: 0 !important;
  }
  
  /* Navbar */
  .main-navbar {
    padding: 0.5rem 0;
  }
  
  .main-navbar .navbar-toggler {
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
  }
  
  .main-navbar .nav-link {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    border-bottom: 1px solid #e9ecef;
  }
  
  .main-navbar .nav-link:last-child {
    border-bottom: none;
  }
  
  .dropdown-menu {
    border: none;
    box-shadow: none;
    padding-left: 1rem;
    background: #f8f9fa;
  }
  
  .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  /* Footer */
  .site-footer {
    min-height: auto;
    padding: 1.5rem 0 1rem;
  }
  
  .site-footer h5 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
  }
  
  .site-footer ul li {
    margin-bottom: 0.3rem;
  }
  
  .site-footer a {
    font-size: 0.9rem;
  }
  
  .footer-logo-wrapper {
    padding: 8px;
  }
  
  .footer-logo {
    height: 60px;
  }
  
  .footer-icon {
    width: 22px;
    height: 22px;
    margin-right: 8px;
  }
  
  .company-details p {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
  }
  
  .footer-hr {
    margin: 1rem 0;
  }
  
  .footer-hours {
    font-size: 0.85rem;
  }
}

/* Mobile - 576px */
@media (max-width: 576px) {
  /* Toolbar - Căn giữa */
  .toolbar-section {
    padding: 0.6rem 0;
  }
  
  .toolbar-section .container {
    padding: 0 15px;
    flex-direction: column;
    align-items: center !important;
    gap: 0.6rem;
  }
  
  .toolbar-section .d-flex.align-items-center.gap-3 {
    justify-content: center;
    gap: 1.5rem !important;
  }
  
  .toolbar-section .d-flex.align-items-center.gap-2 {
    justify-content: center;
    gap: 0.5rem !important;
  }
  
  .toolbar-link {
    flex-direction: column;
    align-items: center;
    padding: 0.3rem;
  }
  
  .toolbar-link span {
    font-size: 0.8rem;
    text-align: center;
  }
  
  .toolbar-icon {
    width: 28px;
    height: 28px;
  }
  
  .toolbar-icon-small {
    width: 18px;
    height: 18px;
  }
  
  .login-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  .btn-cart-custom {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .btn-cart-custom span {
    display: none;
  }
  
  .search-bar-wrapper {
    width: 100%;
    order: 3;
  }
  
  .search-bar-wrapper .form-control {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
  }
  
  .search-bar-wrapper .btn {
    padding: 0.4rem 0.8rem;
  }
  
  /* Brand Section - Logo to căn giữa, text nhỏ hơn */
  .brand-section {
    padding: 0.8rem 0;
  }
  
  .brand-section .row {
    flex-direction: column;
    align-items: center;
  }
  
  .brand-section .col-md-5 {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
  }
  
  .brand-section .col-md-5 img {
    max-height: 90px !important;
    width: auto;
  }
  
  .brand-section .col-md-7 {
    width: 100%;
  }
  
  .brand-section .col-md-7 > div {
    padding: 0.8rem 1rem;
    text-align: center;
    align-items: center;
    flex-direction: column;
  }
  
  .brand-section .col-md-7 h1 {
    font-size: 1.2rem !important;
    margin-bottom: 0.2rem !important;
    line-height: 1.3;
  }
  
  .brand-section .col-md-7 p {
    font-size: 0.9rem !important;
    margin-bottom: 0 !important;
  }
  
  /* Navbar */
  .main-navbar {
    border-width: 1px;
  }
  
  .main-navbar .navbar-brand {
    font-size: 1rem;
  }
  
  .main-navbar .navbar-toggler {
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
  }
  
  .main-navbar .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.6rem;
  }
  
  .dropdown-item {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  /* Footer */
  .site-footer {
    padding: 1rem 0 0.8rem;
  }
  
  .site-footer .container {
    padding: 0 15px;
  }
  
  .site-footer h5 {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
  }
  
  .site-footer a {
    font-size: 0.8rem;
  }
  
  .footer-logo-wrapper {
    padding: 6px;
  }
  
  .footer-logo {
    height: 50px;
  }
  
  .footer-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
  }
  
  .company-details p {
    font-size: 0.8rem;
    line-height: 1.5;
  }
  
  .footer-hours {
    font-size: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .site-footer::before {
    display: none;
  }
}

/* Mobile nhỏ - 375px */
@media (max-width: 375px) {
  /* Toolbar */
  .toolbar-link span {
    font-size: 0.75rem;
  }
  
  .toolbar-icon {
    width: 24px;
    height: 24px;
  }
  
  .login-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }
  
  /* Brand Section */
  .brand-section .col-md-5 img {
    max-height: 80px !important;
  }
  
  .brand-section .col-md-7 h1 {
    font-size: 1.1rem !important;
  }
  
  .brand-section .col-md-7 p {
    font-size: 0.85rem !important;
  }
  
  .main-navbar .nav-link {
    font-size: 0.8rem;
  }
  
  .footer-logo {
    height: 40px;
  }
  
  .site-footer h5 {
    font-size: 0.9rem;
  }
  
  .site-footer a {
    font-size: 0.75rem;
  }
  
  .company-details p {
    font-size: 0.75rem;
  }
}

/* ============================================
   5. UTILITY CLASSES
   ============================================ */

.vr {
  display: inline-block;
  align-self: stretch;
  width: 1px;
  min-height: 1em;
  background-color: currentcolor;
  opacity: 0.25;
}

/* Visually hidden but accessible */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ============================================
   6. ANIMATIONS & TRANSITIONS
   ============================================ */

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Apply smooth animations to page load */
.toolbar-section,
.brand-section,
.main-navbar {
  animation: slideInFromTop 0.6s ease-out;
}

/* ======================================================================================================================= */
/* END LAYOUT PAGE SPECIFIC STYLES */
/* ======================================================================================================================= */