@import url("https://fonts.googleapis.com/css2?family=Tahoma:wght@400;700&display=swap");

/* --- Base Body and Layout --- */
body {
    font-family: Tahoma ,Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: white;
    text-align: center;
}

html {
    scroll-behavior: smooth;
}

/* --- Header and Navigation --- */
header {
    background-color: #0e1167;
    color: white;
    padding: 0;
    height: 65px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-logo-link{
  display:inline-flex;          /* keeps your flexy layout */
  align-items:center;
  text-decoration:none;         /* no underline */
  color:inherit;                /* keep current colors */
}

/* This is the new container for the logo and text */
.header-logo-group {
    display: flex;
    align-items: center;
}

/* This rule reverses the logo and text for Arabic on DESKTOP */
html[dir="rtl"] .header-logo-group {
    flex-direction: row-reverse;
    margin-right: 10px;
}

.logo_img {
    width: 50px;
    height: 50px;
    margin-inline-start: 10px;
}
/* For RTL, the margin should be on the other side after reversing */
html[dir="rtl"] .logo_img {
    margin-inline-start: 0;
    margin-inline-end: 10px;
}

.header-left {
    padding-inline-start: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    white-space: nowrap;
}
/* For RTL, the padding should be on the other side after reversing */
html[dir="rtl"] .header-left {
    padding-inline-start: 0;
    padding-inline-end: 20px;
}

.main-text {
    font-size: 24px;
    font-weight: bold;
}

.sub-text {
    font-size: 24px;
    color: white;
    margin-top: 2px;
}

/* Unified Header Links */
.h, .all, .o {
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    padding: 10px;
    display: inline-block;
    font-size: 20px;
    white-space: nowrap;
    transition: background-color 0.3s, color 0.3s, transform 0.3s, padding 0.3s;
}

.h {
    margin-inline-start: 150px;
}

.all, .o {
    margin-inline-start: 25px;
}

/* Unified Hover Effect */
.h:hover, .all:hover, .o:hover, nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    border-radius: 5px;
}
/* Fix truncation + make “Offers” pop */
.o{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.5rem 1rem;
  border-radius:999px;
  background:linear-gradient(135deg,#0e1167,#28b5b5);
  color:#fff !important;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;   /* keep full word */
  overflow:visible;     /* avoid clipping */
  flex:0 0 auto;        /* don’t let nav shrink it */
  box-shadow:0 8px 18px rgba(14,17,103,.28), inset 0 0 0 1px rgba(255,255,255,.12);
  transition:transform .18s ease, box-shadow .18s ease;
}
.o::before{
  /* Font Awesome tag icon (requires FA on the page) */
  font-family:"Font Awesome 6 Free";
  font-weight:900;
  content:"\f02b";      /* fa-tag */
  font-size:1rem;
  line-height:1;
}
.o:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(14,17,103,.34), inset 0 0 0 1px rgba(255,255,255,.16);
}
.o:focus-visible{
  outline:3px solid rgba(40,181,181,.7);
  outline-offset:2px;
}

nav {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    align-items: center;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    padding: 10px 15px;
    margin-inline: 5px;
    display: inline-flex;
    align-items: center;
    font-size: 20px;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
}

/* Styles for Font Awesome icons in the nav */
.nav-icon i {
    font-size: 22px;
    vertical-align: middle;
}

a[href="/view_cart"].nav-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: 0px;
    right: 0px;
    background: red;
    color: white;
    padding: 1px 5px;
    font-size: 12px;
    border-radius: 50%;
    font-weight: bold;
}

/* Style for icons inside the mobile nav menu */
#mobile-nav i {
    width: 25px;
    margin-right: 10px;
}
html[dir="rtl"] #mobile-nav i {
    margin-right: 0;
    margin-left: 10px;
}

/* --- Common Page Elements --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px;
    position: relative;
}

.back-button {
    position: absolute;
    background-color: #0e1167;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.back-button:hover {
    background-color: #1c2687;
}

/* Cart Popup Message */
.cart-msg-box {
    position: fixed;
    top: 80px;
    background-color: #0e1167;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    font-size: 14px;
    z-index: 999;
    display: none;
}
.cart-msg-box.success { background-color: #28a745; }
.cart-msg-box.error { background-color: #dc3545; }

/* --- Footer --- */
.footer {
    background-color: #0e1167;
    color: white;
    text-align: center;
    padding: 20px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer p {
    margin: 0;
    font-size: 16px;
}

.footer .socials {
    margin-top: 10px;
}

.footer .socials a {
    color: white;
    text-decoration: underline;
    margin-inline: 15px;
    font-size: 18px;
    transition: color 0.3s, transform 0.3s;
}

.footer .socials a:hover {
    color: #30348e;
    transform: scale(1.1);
}

/* Default visibility for mobile elements on desktop */
#hamburger-menu,
#mobile-nav {
    display: none !important;
}