:root {
  --font-body: "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Poppins", "Inter", "Roboto", "Helvetica Neue", Arial,
    sans-serif;
  --color-text-main: #1f2937;
  --color-text-muted: #5f6a7d;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  font-size: 15.5px;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.top-header {
  background: #f8f9fa !important;
  color: #000 !important;
  font-size: 0.9rem;
  padding: 8px 0 !important;
}

.top-meta-list,
.header-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.top-meta-item,
.header-quick-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
}

.top-meta-item:not(:last-child),
.header-quick-item:not(:last-child) {
  padding-right: 0.85rem;
  margin-right: 0.85rem;
  border-right: 1px solid rgba(0, 0, 0, 0.25);
}

.currency-badge {
  gap: 0.75rem;
  align-items: center;
}

.currency-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.meta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.meta-link:hover {
  color: #38bdf8;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  color: #000;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.header-link:hover {
  color: #c4b5fd;
}

.logout-form {
  margin: 0;
}

.logout-button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.logout-button:focus-visible {
  outline: 2px solid #c084fc;
  outline-offset: 2px;
}

.search_trigger.btn {
  padding: 0.25rem 0.5rem;
  color: #111827;
}

.search_trigger.btn:hover,
.search_trigger.btn:focus {
  color: #6366f1;
  text-decoration: none;
}

.top-right-links {
  justify-content: flex-end;
}

.top-header .btn {
  float: left;
  margin: 0;
  font-size: 28px;
  color: #333;
  transition: all 0.5s ease 0s;
  border-radius: 0;
  height: 35px;
  width: 35px;
  padding: 0;
  line-height: 36px;
  border: none;
  background: transparent;
}

.top-header .btn:hover {
  background: transparent;
  color: #000;
}

.top-header .btn i {
  font-size: 28px;
  line-height: 1;
}

.site-name-mobile {
  display: none;
}

.site-brand-name {
  background: linear-gradient(
    135deg,
    #1e3a5f 0%,
    #4a5f7f 30%,
    #6b7a92 50%,
    #4a5f7f 70%,
    #1e3a5f 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 8px rgba(30, 58, 95, 0.15);
  position: relative;
  filter: drop-shadow(0 1px 2px rgba(30, 58, 95, 0.1));
}

.site-brand-name::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  background: linear-gradient(
    135deg,
    rgba(30, 58, 95, 0.4) 0%,
    rgba(107, 122, 146, 0.3) 50%,
    rgba(30, 58, 95, 0.4) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: blur(8px);
}

.site-brand-name-mobile {
  background: linear-gradient(
    135deg,
    #1e3a5f 0%,
    #4a5f7f 30%,
    #6b7a92 50%,
    #4a5f7f 70%,
    #1e3a5f 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 3px rgba(30, 58, 95, 0.15));
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@media (max-width: 991.98px) {
  .top-header {
    text-align: center;
    position: relative;
  }

  .top-header .container {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-right: 15px;
    padding-left: 15px;
  }

  .site-name-mobile {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.8px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    padding-right: 8px;
    padding-left: 8px;
  }

  .top-header .btn {
    margin-bottom: 0;
    align-self: flex-start;
    margin-left: 0;
  }

  #topHeaderCollapse {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
    width: 100%;
    clear: both;
  }

  #topHeaderCollapse .row {
    flex-direction: column;
  }

  #topHeaderCollapse .col-md-6 {
    width: 100%;
    margin-bottom: 15px;
  }

  .contact_detail {
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  .contact_detail li {
    width: 100%;
    text-align: center;
  }

  .header_list {
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  .header_list li {
    width: 100%;
    text-align: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
  }

  .header_list li:last-child {
    border-bottom: none;
  }

  .header_list li a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 10px;
  }

  .currency-badge {
    margin: 0 auto;
  }

  .top-meta-list,
  .header-quick-links {
    justify-content: center;
    flex-direction: column;
    gap: 10px;
  }

  .top-meta-item:not(:last-child),
  .header-quick-item:not(:last-child) {
    border-right: 0;
    margin-right: 0;
    padding-right: 0;
  }

  .top-meta-item,
  .header-quick-item {
    justify-content: center;
  }
}

/* ========================================
   COLLECTIONS - Images uniformes
   ======================================== */

/* Images de collection uniformes sur tous les écrans */
.single_banner {
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

.single_banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: all 0.3s ease-in-out;
  display: block;
}

/* Hauteur fixe pour desktop et grands écrans */
@media (min-width: 768px) {
  .single_banner {
    height: 400px;
  }

  .single_banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

/* Hauteur pour tablettes */
@media (min-width: 576px) and (max-width: 767px) {
  .single_banner {
    height: 350px;
  }

  .single_banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

/* Mobile - hauteur automatique mais ratio maintenu */
@media (max-width: 575px) {
  .single_banner {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .single_banner img {
    position: relative;
    width: 100%;
    height: 100%;
  }
}

/* Très petits écrans */
@media (max-width: 400px) {
  .single_banner {
    aspect-ratio: 4 / 3;
  }
}

/* Ajustements pour petits écrans mobiles */
@media (max-width: 575px) {
  .site-name-mobile {
    font-size: 20px;
    right: 12px;
    letter-spacing: 0.6px;
  }

  .top-header .container {
    padding-right: 12px;
    padding-left: 12px;
  }
}

/* Ajustements pour très petits écrans */
@media (max-width: 400px) {
  .site-name-mobile {
    font-size: 18px;
    right: 10px;
    letter-spacing: 0.5px;
  }

  .top-header .container {
    padding-right: 10px;
    padding-left: 10px;
  }
}

.brand-identity {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: 0.75rem;
}

.brand-identity::before {
  content: "";
  position: absolute;
  inset: auto 0 -10px 0;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6b6b, #f6ad55, #60a5fa);
  opacity: 0;
  transform: translateY(4px);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.brand-identity:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.brand-title {
  font-family: "Roboto";
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(
    120deg,
    #6366f1 0%,
    #ec4899 45%,
    #f97316 75%,
    #10b981 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 4px 8px;
  position: relative;
  animation: brand-shine 5.5s ease-in-out infinite;
  margin: 0;
}

.brand-title::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.65);
  transform: translateY(-50%);
  animation: brand-pulse 2.8s ease-in-out infinite;
}

.brand-identity:hover .brand-title {
  animation-duration: 3.5s;
}

@keyframes brand-shine {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes brand-pulse {
  0%,
  100% {
    transform: translateY(-50%) scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-50%) scale(1.15);
    opacity: 1;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.01em;
}

p,
label,
li {
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.navbar-nav .nav-link,
.btn,
.header_list span {
  font-family: var(--font-heading);
  font-weight: 500;
}

input,
select,
textarea,
.form-control {
  font-family: var(--font-body);
  font-size: 15px;
}

.search-form .form-control {
  border-radius: 8px 0 0 8px;
}

.search-form .btn {
  border-radius: 0 8px 8px 0;
}

.product .product_info p {
  color: var(--color-text-muted);
  font-size: 14px;
}

.product .product_title a {
  font-weight: 600;
}

.footer_top,
.footer_dark .widget_title {
  font-family: var(--font-heading);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.footer-description {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

.footer-logout {
  margin: 0;
}

.footer-logout button {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.footer-logout button:hover,
.footer-logout button:focus {
  color: #cbd5f5;
}

.search-info {
  color: var(--color-text-muted);
}

.search-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 500;
}

.search-chip-term {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
}

.search-chip i {
  font-size: 0.9em;
}

/* ========================================
   RESPONSIVITÉ MOBILE - PRODUITS
   ======================================== */

/* Amélioration des sections de produits sur mobile */
@media only screen and (max-width: 575px) {
  /* Espacement général pour les sections de produits */
  .tab-content {
    padding: 0 5px;
  }

  /* Amélioration des colonnes de produits sur mobile */
  .shop_container .col-6 {
    padding-left: 5px !important;
    padding-right: 5px !important;
    margin-bottom: 15px;
  }

  /* Carte produit - optimisée pour mobile */
  .product {
    margin-bottom: 10px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
  }

  .product:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
  }

  /* Image du produit */
  .product_img {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: #f8f9fa;
  }

  .product_img img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
  }

  /* Actions du produit - mieux adaptées au mobile */
  .product_action_box {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .product:hover .product_action_box {
    opacity: 1;
  }

  .product_action_box .pr_action_btn {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .product_action_box .pr_action_btn li {
    flex: 1 1 auto;
    min-width: 40px;
  }

  .product_action_box .pr_action_btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    color: #333;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
  }

  .product_action_box .pr_action_btn a:hover {
    background: #ff324d;
    color: #fff;
    transform: scale(1.05);
  }

  .product_action_box .pr_action_btn a i {
    font-size: 14px;
    margin-right: 4px;
  }

  .product_action_box .pr_action_btn li:not(.add-to-cart) a {
    padding: 8px;
  }

  .product_action_box .pr_action_btn li:not(.add-to-cart) a i {
    margin-right: 0;
  }

  /* Badge de réduction */
  .on_sale {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff324d;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(255, 50, 77, 0.3);
  }

  /* Informations du produit */
  .product_info {
    padding: 10px 8px !important;
    text-align: left;
  }

  /* Titre du produit */
  .product_title {
    font-size: 13px !important;
    line-height: 1.4 !important;
    margin-bottom: 6px !important;
    font-weight: 600 !important;
    color: #333 !important;
    min-height: 35px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product_title a {
    color: #333 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
  }

  .product_title a:hover {
    color: #ff324d !important;
  }

  /* Prix du produit */
  .product_price {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
    flex-wrap: wrap;
  }

  .product_price .price {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #ff324d !important;
    order: 1;
  }

  .product_price del {
    font-size: 12px !important;
    color: #999 !important;
    font-weight: 400 !important;
    order: 2;
  }

  .product_price .on_sale {
    position: static;
    font-size: 10px !important;
    padding: 2px 6px !important;
    order: 3;
  }

  /* Description du produit - cachée sur mobile */
  .pr_desc {
    display: none !important;
  }

  /* Couleurs/variations - optimisées */
  .pr_switch_wrap {
    margin-top: 8px;
  }

  .product_color_switch {
    display: flex;
    gap: 6px;
    justify-content: flex-start;
  }

  .product_color_switch span {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .product_color_switch span.active,
  .product_color_switch span:hover {
    border-color: #333;
    transform: scale(1.1);
  }

  /* Onglets de navigation - améliorés pour mobile */
  .tab-style1 .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
    padding: 0 5px;
  }

  .tab-style1 .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-style1 .nav-item {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .tab-style1 .nav-link {
    padding: 10px 15px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #666 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    white-space: nowrap;
    position: relative;
    transition: all 0.3s ease;
  }

  .tab-style1 .nav-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff324d;
    transition: width 0.3s ease;
  }

  .tab-style1 .nav-link.active {
    color: #ff324d !important;
  }

  .tab-style1 .nav-link.active::after {
    width: 100%;
  }

  /* Grille de produits - 2 colonnes bien espacées */
  .shop_container.row {
    margin-left: -5px !important;
    margin-right: -5px !important;
  }

  /* Titre de la section */
  .heading_s1 h2 {
    font-size: 22px !important;
    margin-bottom: 20px !important;
    font-weight: 700 !important;
    color: #333 !important;
  }

  /* Animation de chargement */
  .product_img::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.5),
      transparent
    );
    animation: shimmer 1.5s infinite;
    z-index: 1;
  }

  @keyframes shimmer {
    0% {
      transform: translateX(-100%);
    }
    100% {
      transform: translateX(100%);
    }
  }

  .product_img.loaded::before {
    display: none;
  }
}

/* Tablettes en mode portrait */
@media only screen and (min-width: 576px) and (max-width: 767px) {
  .shop_container .col-6 {
    max-width: 50%;
    flex: 0 0 50%;
    padding-left: 8px;
    padding-right: 8px;
  }

  .product_title {
    font-size: 14px !important;
  }

  .product_price .price {
    font-size: 16px !important;
  }

  .product_info {
    padding: 12px 10px !important;
  }
}

/* Amélioration pour très petits écrans */
@media only screen and (max-width: 380px) {
  .product_title {
    font-size: 12px !important;
    min-height: 32px;
  }

  .product_price .price {
    font-size: 14px !important;
  }

  .product_action_box .pr_action_btn a {
    font-size: 10px;
    padding: 6px 8px;
  }

  .tab-style1 .nav-link {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  .heading_s1 h2 {
    font-size: 20px !important;
  }
}

/* ============================================
   Single Product Page - Cart Buttons Styling
   ============================================ */

/* Buy Now button distinctive styling */
.btn-buynow {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2) !important;
}

.btn-buynow:hover {
  background: linear-gradient(135deg, #218838 0%, #1aa179 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3) !important;
}

.btn-buynow i {
  margin-right: 5px;
}

/* Add to Cart button - keep original style but enhanced */
.btn-addtocart {
  transition: all 0.3s ease !important;
}

.btn-addtocart:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(255, 92, 0, 0.3) !important;
}

/* Pulse animation for hover effect */
@keyframes pulse-animation {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse-animation {
  animation: pulse-animation 0.6s ease-in-out;
}

/* Cart buttons container spacing */
.cart_btn {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Responsive adjustments for cart buttons */
@media (max-width: 575px) {
  .cart_btn .btn {
    flex: 1 1 100%;
    margin-bottom: 10px;
  }

  .btn-addtocart,
  .btn-buynow {
    width: 100%;
    justify-content: center;
  }
}
