/*
Theme Name: Sartawi Product Theme
Author: Your Name
Version: 1.0
*/

/* === Import Elegant Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Montserrat:wght@500&display=swap');

/* === Layout and Global === */
body {
    background-color: #fafafa;
    color: #111111;
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #666;
}

/* === Logo & Header === */
header, .sartawi-logo {
    padding: 20px 0 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.custom-logo {
    max-height: 80px;
    height: auto;
    width: auto;
}

/* === Navigation Menu === */
.navbar {
    background-color: #fafafa !important;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 10px;
}

.navbar-nav {
    justify-content: center;
    gap: 30px;
}

.navbar-nav .nav-link {
    font-size: 13px;
    font-weight: 600;
    color: #111 !important;
    padding: 6px 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease-in-out;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #000 !important;
    border-bottom: 2px solid #000;
}

/* === Section Styling === */
.section-products {
    background-color: #fafafa;
    padding-top: 20px;
    padding-bottom: 60px;
}

.section-products h1 {
    margin-top: 10px;
    margin-bottom: 40px;
    font-size: 32px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
}

.section-products section {
    padding-top: 0px;
    padding-bottom: 0px;
}

.section-products section:not(:last-of-type) {
    border-bottom: 1px solid #eaeaea;
}

.section-products h2 {
    font-size: 20px;
    margin-bottom: 30px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: 'Playfair Display', serif;
}

/* === Product Cards === */
.card {
    border: 1px solid #eee;
    border-radius: 8px;
    transition: box-shadow 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card-img-top {
    object-fit: cover;
    height: 200px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #111;
}

.card-text {
    font-size: 14px;
    color: #666;
}

/* === Buttons === */
.btn {
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-outline-dark {
    color: #000;
    border-color: #000;
}

.btn-outline-dark:hover {
    background-color: #000;
    color: #fff;
}

/* === Chat Button Animation === */
.chat-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}
.chat-btn:hover {
    transform: scale(1.05);
}

.chat-text {
    display: inline-block;
    animation: typing 1.5s steps(20, end) infinite, blink 1s step-end infinite;
    white-space: nowrap;
    border-right: 2px solid white;
}
@keyframes typing {
    0% { width: 0 }
    50% { width: 100% }
    100% { width: 0 }
}
@keyframes blink {
    50% { border-color: transparent }
}

/* === CHAT UI STYLES === */
.chat-wrapper {
    font-size: 15px;
    line-height: 1.6;
    text-align: initial !important;
}

.chat-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    direction: rtl;
    width: 100%;
    box-sizing: border-box;
    overflow: visible !important;
    max-height: none !important;
}

.chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    width: 100%;
    clear: both;
}

.chat-msg.user {
    flex-direction: row-reverse;
    justify-content: flex-end;
    direction: rtl;
}

.chat-msg.ai {
    flex-direction: row;
    justify-content: flex-start;
    direction: ltr;
}

.chat-msg.user div,
.chat-msg.ai div {
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 75%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.chat-msg.user div {
    background-color: #d1e7dd;
    text-align: right;
}

.chat-msg.ai div {
    background-color: #ffffff;
    text-align: left;
}

.chat-msg i {
    font-size: 18px;
    color: #6c757d;
    align-self: flex-end;
    margin-top: 0;
    margin-bottom: 0;
}

.chat-msg.user i {
    margin-left: 8px;
    margin-right: 0;
}

.chat-msg.ai i {
    margin-right: 8px;
    margin-left: 0;
}

.typing-animation {
    animation: pulseFade 2s infinite;
    font-size: 14px;
    opacity: 0.7;
    font-style: italic;
    text-align: center;
}
@keyframes pulseFade {
    0%, 100% { opacity: 0.6; }
    90% { opacity: 1; }
}

.typing-indicator {
    display: flex;
    align-items: center;
    font-style: italic;
    font-size: 14px;
    color: #888;
    gap: 6px;
}
.typing-dots span {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.3s infinite;
    margin: 0 2px;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(1); }
    40% { transform: scale(1.5); }
}



/* === Section Label === */
.section-products p.text-muted {
    margin-bottom: 0;
}

/* === Animation Prep === */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease-out forwards;
}
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Footer === */
footer {
    font-size: 14px;
    color: #777;
}

/* === Top Banner Styles === */
.top-banner {
    font-size: 13px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}
.top-banner a {
    color: #666;
    text-decoration: none;
}
.top-banner a:hover {
    color: #000;
}
@media (max-width: 576px) {
    .top-banner .container {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
}

/* === Form Styles === */
form input,
form textarea {
    border-radius: 0;
    border: 1px solid #ccc;
    font-size: 15px;
}
form input:focus,
form textarea:focus {
    border-color: #000;
    box-shadow: none;
}
form .btn {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* === About Page Icons === */
.about-icon i {
    font-size: 28px;
    color: #000;
}

/* === Responsive === */
/* === Responsive Mobile Mega-Menu === */
@media (max-width: 991px) {
  /* Hide panel by default */
  .mega-menu {
    display: none;
    position: static;
    width: 100%;
    padding: 0;
    box-shadow: none;
    flex-direction: column;  /* stack items vertically */
  }

  /* Show panel when parent has .open */
  .navbar-nav > .has-children.open > .mega-menu {
    display: flex;
  }

  /* Full-width items */
  .mega-item {
    width: 100%;
    padding: 10px 0;
  }
}
/* === Black & White Styled Pagination === */
.pagination-wrapper {
  text-align: center;
  margin-top: 2rem; /* space above */
}

.pagination-wrapper .page-numbers {
  display: inline-flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination-wrapper .page-numbers a,
.pagination-wrapper .page-numbers span {
  color: #111;                        /* dark text */
  text-transform: uppercase;          /* uppercase labels */
  font-weight: 600;                   /* semi-bold */
  font-size: 13px;
  letter-spacing: 1px;
  padding: 0.5rem 0.75rem;
  background: none;                   /* no background */
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-bottom-color 0.2s;
}

.pagination-wrapper .page-numbers a:hover {
  color: #000;                        /* pure black on hover */
  border-bottom-color: #000;          /* underline effect */
  text-decoration: none;
}

.pagination-wrapper .page-numbers .current {
  color: #000;                        /* active link in black */
  border-bottom-color: #000;          /* permanent underline */
  cursor: default;
}

/* === Primary Navbar Links === */
.navbar-nav .nav-link {
  color: #111 !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 1rem;
  transition: color 0.2s ease-in-out;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #000 !important;
}

/* === Icon Spacing === */
.navbar-nav .nav-link i {
  margin-right: 0.5rem;
  font-size: 1.1em;
  vertical-align: middle;
}

/* === Dropdown Menu Styling === */
.dropdown-menu {
  background-color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-top: 0.5rem;
  min-width: 200px;
}
.dropdown-menu .dropdown-item,
.dropdown-menu a {
  color: #333;
  padding: 0.5rem 1rem;
  display: block;
  font-size: 14px;
  text-transform: capitalize;
  transition: color 0.2s;
}
.dropdown-menu .dropdown-item:hover,
.dropdown-menu a:hover {
  color: #000;
}

/* === Submenu Icon Spacing === */
.dropdown-menu i {
  margin-right: 0.5rem;
  font-size: 1em;
}

/* === Hover to Open on Desktop === */
@media (min-width: 992px) {
  .navbar-nav .dropdown:hover > .dropdown-menu {
    display: block;
  }
}

/* === Mobile: keep Bootstrap’s tap-to-open === */
@media (max-width: 991.98px) {
  .navbar-nav .dropdown-menu {
    display: none;
  }
  .navbar-nav .dropdown.show > .dropdown-menu {
    display: block;
  }
}
/* hide Bootstrap’s default dropdown arrow */
.navbar-nav .dropdown-toggle::after {
  display: none !important;
}
/* keep the dropdown open while hovering either the parent <li> or the menu itself */
.navbar-nav .dropdown:hover > .dropdown-menu,
.navbar-nav .dropdown .dropdown-menu:hover {
  display: block !important;
}

/* remove any gap so the menu doesn’t “lose” the hover on the way down */
.navbar-nav .dropdown-menu {
  margin-top: 0;    /* sit flush immediately under the parent link */
  top: 100%;        /* ensure it starts right at the bottom of the li */
}

/* === Nested dropdown positioning (required by Sartawi_Walker_Nav_Menu) === */
.dropdown-submenu {                 /* the <li> that has its own submenu */
  position: relative;
}
.dropdown-submenu > .dropdown-menu { /* the inside <ul> */
  top: 0;
  left: 100%;
  margin-top: -1px;                 /* sits flush with parent */
}

/* ───────────────── 3-level dropdowns (desktop + mobile) ───────────────── */

/* Position & hide by default */
.dropdown-submenu            { position: relative; }
.dropdown-submenu > .dropdown-menu {
  display: none;     /* hidden until hover (desktop) or .show (mobile) */
  top: 0;
  left: 100%;
  margin-top: -1px;
  z-index: 1001;     /* sit on top of the 2-nd level */
}

/* Desktop ≥992 px: open on pure hover */
@media (min-width: 992px) {
  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
  }
}

/* Mobile <992 px: open when JS toggles .show on the <li> */
@media (max-width: 991.98px) {
  .dropdown-submenu.show > .dropdown-menu {
    display: block;
  }
}
/* Hero keeps square frame no matter the original ratio */


/* Thumbnails stay 90 × 90, already set inline but add aspect-ratio for Safari */
.thumb-img {
    width: 90px;
    height: 90px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

#hero-container{
    background-color:#fff;
}
/* Overlay icon */
#hero-container .zoom-icon{
	position:absolute;
	top:50%;left:50%;
	transform:translate(-50%,-50%);
	font-size:3rem;
	color:rgba(255,255,255,.85);
	opacity:0;
	pointer-events:none;
	transition:opacity .2s ease;
}
#hero-container:hover .zoom-icon{ opacity:1; }

/* Cursor & object-fit safety */

/* Modal image scaling */
#zoomModalImg{ transition:transform .15s ease; cursor:zoom-in; }



#hero-container     { aspect-ratio:1/1; }  /* keeps layout stable */

#hero-container .zoom-icon{ position:absolute; top:50%; left:50%;
                            transform:translate(-50%,-50%);
                            font-size:3rem; color:rgba(255,255,255,.9);
                            opacity:0; pointer-events:none;
                            transition:opacity .2s ease; }
#hero-container:hover .zoom-icon{ opacity:1; }

/* Thumbnails already inline-styled; keep safety net */
.thumb-img{ aspect-ratio:1/1; object-fit:cover; }
/* Hero frame: soft elevation + hairline border */
#hero-container{
    border:1px solid rgba(0,0,0,.08);      /* hairline border */
    box-shadow:0 6px 18px rgba(0,0,0,.07); /* soft shadow */
    border-radius:8px;                     /* rounded corners */
    overflow:hidden;                       /* crop zoomed image */
}
