/* IRIS Beauty - Main Stylesheet (v3.0) */

/* === Theme Variables (Linked dynamically to brand variables) === */
:root {
  --body-bg: #fdf5f8;
  --card-bg: #ffffff;
  --nav-bg: #ffffff;
  --nav-text: #2d2025;
  --nav-active-text: var(--brand-primary, #D85A7F);
  --heading-color: #2d2025;
  --label-color: #2d2025;
  --text-color: #2d2025;
  --text-muted-color: #8c6b77;
  --accent-color: var(--brand-secondary, #F06292);
  --input-bg: #fff8fa;
  --input-border: #f5d6e2;
  --input-focus-border: var(--brand-primary, #D85A7F);
  --button-primary-bg: var(--brand-primary, #D85A7F);
  --button-primary-text: #ffffff;
  --button-primary-hover-bg: #b84366;
  --button-secondary-bg: var(--brand-light, #fdf2f6);
  --button-secondary-text: var(--brand-primary, #D85A7F);
  --button-danger-bg: #ef4444;
  --button-danger-hover-bg: #dc2626;
  --button-success-bg: #22c55e;
  --table-border: #f5d6e2;
  --table-header-bg: var(--brand-light, #fdf2f6);
  --card-shadow: 0 4px 18px rgba(216, 90, 127, 0.08);
  --container-padding: 20px;
  --card-radius: 12px;
  --brand-primary: #D85A7F;
  --brand-secondary: #F06292;
  --text-dark: #2d2025;
  --text-light: #8c6b77;
  --bg-main: #fdf5f8;
  --bg-light: #ffffff;
  --border-color: #f5d6e2;
  --success-color: #4CAF50;
  --danger-color: #F44336;
  --shadow-light: 0 4px 15px rgba(216, 90, 127, 0.06);
  --shadow-medium: 0 8px 25px rgba(216, 90, 127, 0.12);
}

/* === Global & Typography === */
body {
  background-color: var(--body-bg);
  color: var(--text-color);
  font-family: 'Plus Jakarta Sans', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; 
}

#page-wrapper {
  background-color: var(--bg-main);
  position: relative;
  left: 0;
  transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.off-canvas-open { overflow: hidden; }
[dir="ltr"] body.off-canvas-open #page-wrapper { left: -150px; }
[dir="rtl"] body.off-canvas-open #page-wrapper { left: 150px; }

header {
  text-align: center;
  padding: 10px 0;
}

header img {
  height: 60px;
  margin: 10px 20px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-weight: 700;
}

a { 
  text-decoration: none; 
  color: var(--brand-primary); 
  transition: color 0.3s ease; 
}
a:hover { 
  color: var(--brand-secondary); 
}

.page-title {
  color: var(--heading-color);
  font-family: 'Playfair Display', serif;
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 25px;
}

main { 
  padding: 20px 40px; 
  flex: 1; 
}

/* === Unified Navigation Bar (Admin) === */
nav.admin-nav {
  background: var(--nav-bg);
  padding: 15px 20px;
  border-bottom: 1px solid var(--table-border);
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

nav.admin-nav .btn {
  text-decoration: none;
  color: var(--nav-text);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

nav.admin-nav .btn:hover {
  background-color: var(--input-bg);
}

nav.admin-nav .btn.active {
  color: var(--nav-active-text);
  font-weight: 700;
}

.nav-logout {
  background-color: var(--button-primary-bg) !important;
  color: var(--button-primary-text) !important;
}

.nav-logout:hover {
  background-color: var(--button-primary-hover-bg) !important;
}

/* === Layout === */
.page-container,
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 30px;
}

.card,
.content-box {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 25px;
  margin-bottom: 25px;
}

/* === Forms === */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--label-color);
  font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="file"],
input[type="date"],
input[type="datetime-local"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: var(--label-color);
  font-family: inherit;
  font-size: 1em;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--input-focus-border);
  outline: none;
  box-shadow: 0 0 0 3px rgba(216, 90, 127, 0.15);
}

/* === Buttons === */
button,
.action-button,
.btn {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.action-button:hover {
  background: var(--button-primary-hover-bg);
  transform: translateY(-1px);
}

/* === Tables === */
.table,
.sales-table,
.inventory-table,
.users-table,
.descriptions-table,
.expenses-table,
.results-table,
.styled-table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td,
.sales-table th, .sales-table td,
.inventory-table th, .inventory-table td,
.users-table th, .users-table td,
.descriptions-table th, .descriptions-table td,
.expenses-table th, .expenses-table td,
.results-table th, .results-table td,
.styled-table th, .styled-table td {
  padding: 12px 15px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--table-border);
}

.table th,
.sales-table th,
.inventory-table th,
.users-table th,
.descriptions-table th,
.expenses-table th,
.results-table th,
.styled-table th {
  background: var(--table-header-bg);
  color: var(--heading-color);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

tbody tr:hover {
  background-color: var(--body-bg);
}

/* === Alert Messages === */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 8px;
}
.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}
.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}
.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}
.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

/* --- E-Commerce Header --- */
.page-header { position: relative; z-index: 1000; background-color: var(--bg-light); box-shadow: var(--shadow-light); }
#header-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.page-header > * { position: relative; z-index: 1; }

.announcement-bar { background-color: var(--brand-primary); color: white; display: flex; flex-direction: column; gap: 8px; justify-content: center; align-items: center; padding: 12px 20px; font-weight: 500; font-size: 0.9em; letter-spacing: 0.5px; text-align: center; }
.announcement-bar a { color: white; display: flex; align-items: center; gap: 8px; text-decoration: none; }

.instagram-btn { padding: 8px 16px; border-radius: 8px; background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: white; font-weight: 600; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: var(--shadow-light); }
.instagram-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-medium); color: white; }

.main-header { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.header-actions { flex: 1; display: flex; align-items: center; gap: 25px; }
.header-left { justify-content: flex-start; }
.header-right { justify-content: flex-end; }
.logo-container { flex-shrink: 0; padding: 0 20px; }
.logo-container img { max-height: 80px; width: auto; display: block; }
.header-actions a { color: var(--text-light); font-size: 1em; font-weight: 500; position: relative; display: flex; align-items: center; gap: 8px; }
.header-actions a .fa-solid, .header-actions a .fas { font-size: 1.3em; }

.theme-switcher { display: flex; align-items: center; gap: 10px; }
.theme-dot { width: 20px; height: 20px; border-radius: 50%; cursor: pointer; border: 2px solid var(--border-color); transition: transform 0.2s; }
.theme-dot:hover { transform: scale(1.2); }

.main-nav { background: var(--bg-light); border-top: 1px solid var(--border-color); padding: 0 20px; }
.main-nav ul { list-style: none; padding: 0; margin: 0; display: flex; justify-content: center; gap: 20px; }
.main-nav a { display: flex; align-items: center; gap: 8px; padding: 18px 15px; color: var(--text-light); font-weight: 500; position: relative; border-bottom: 3px solid transparent; transition: all 0.3s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--brand-primary); border-bottom-color: var(--brand-secondary); }

/* --- Sticky Header & Slider --- */
.sticky-header-bottom { position: sticky; top: 0; z-index: 999; background-color: var(--bg-main); transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out; }
.sticky-header-bottom.scrolled { background-color: rgba(253, 245, 248, 0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--shadow-medium); }
.sticky-header-bottom.scrolled .search-section { border-top-color: transparent; }

.main-group-slider-container { padding: 15px 0; position: relative; max-width: 1200px; margin: 0 auto; transition: padding 0.3s ease; }
.main-group-slider-wrapper { overflow: hidden; }
.main-group-slider-track { display: flex; gap: 15px; padding: 5px 15px; scroll-behavior: auto; overflow-x: auto; scrollbar-width: none; }
.main-group-slider-track::-webkit-scrollbar { display: none; }
.main-group-slide { flex: 0 0 95px; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text-dark); transition: transform 0.2s ease, height 0.3s ease; }
.main-group-slide:hover { transform: translateY(-3px); }
.main-group-slide .img-wrapper { width: 75px; height: 75px; border-radius: 50%; overflow: hidden; margin-bottom: 8px; background-color: #fff; border: 2px solid var(--border-color); box-shadow: var(--shadow-light); display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; }
.main-group-slide img { width: 100%; height: 100%; object-fit: cover; }
.main-group-slide span { font-size: 0.8em; font-weight: 500; text-align: center; line-height: 1.2; }

/* Slider Scrolled State */
.sticky-header-bottom.scrolled .main-group-slider-container { padding: 5px 0; }
.sticky-header-bottom.scrolled .main-group-slide .img-wrapper { width: 0; height: 0; opacity: 0; margin-bottom: 0; border-width: 0; }
.sticky-header-bottom.scrolled .main-group-slide { justify-content: center; height: 30px; flex-basis: auto; padding: 0 10px; }

/* --- Search Section --- */
.search-section { background-color: transparent; padding: 20px 40px; border-top: 1px solid var(--border-color); display: flex; justify-content: center; align-items: center; gap: 15px; }
.search-container { display: flex; align-items: center; justify-content: center; gap: 15px; width: 100%; max-width: 700px; position: relative; }
.search-bar { width: 100%; position: relative; }
.search-bar input { width: 100%; padding: 15px 25px 15px 60px; border-radius: 30px; border: 1px solid var(--border-color); background-color: var(--bg-light); font-size: 1em; transition: all 0.3s ease; box-sizing: border-box; }
.search-bar input:focus { outline: none; border-color: var(--brand-secondary); box-shadow: 0 0 0 3px rgba(216, 90, 127, 0.2); }
.search-bar .fa-search { position: absolute; left: 25px; top: 50%; transform: translateY(-50%); color: #aaa; font-size: 1.2em; }

#search-icon-button { display: none; font-size: 1.4em; padding: 12px 14px; border-radius: 50%; border: 1px solid var(--border-color); background-color: var(--bg-light); color: var(--text-dark); cursor: pointer; transition: all 0.2s ease; }
#search-icon-button:hover { background-color: var(--bg-main); border-color: var(--brand-secondary); }

#desktop-install-button { display: none; background-color: var(--success-color); color: white; border: none; border-radius: 25px; padding: 12px 20px; font-size: 1em; font-weight: 600; cursor: pointer; align-items: center; gap: 8px; transition: background-color 0.2s ease, transform 0.2s ease; white-space: nowrap; }
#desktop-install-button:hover { background-color: #3e8e41; transform: scale(1.03); }
.search-container.pwa-install-available #desktop-install-button { display: flex; }
.search-container.pwa-install-available .search-bar { display: none; }
.search-container.pwa-install-available #search-icon-button { display: block; }
.search-container.search-active .search-bar { display: block; }
.search-container.search-active #search-icon-button { display: none; }

#live-search-results { position: absolute; top: calc(100% + 5px); left: 0; right: 0; background-color: var(--bg-light); border: 1px solid var(--border-color); border-radius: 15px; z-index: 1000; max-height: 350px; overflow-y: auto; display: none; box-shadow: var(--shadow-medium); }
.search-result-item { display: flex; align-items: center; padding: 12px 20px; text-decoration: none; color: var(--text-dark); border-bottom: 1px solid var(--border-color); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background-color: var(--bg-main); }
.search-result-item img { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; margin-right: 15px; }

/* --- Basket & Off-Canvas --- */
.floating-basket-icon { position: fixed; bottom: 95px; z-index: 1001; background: var(--brand-primary); color: white; border-radius: 50%; width: 65px; height: 65px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: transform 0.2s ease; }
.floating-basket-icon:hover { transform: scale(1.1); color: white; }
.floating-basket-icon .basket-count { position: absolute; top: -5px; right: -5px; background: var(--danger-color); color: white; border-radius: 50%; min-width: 26px; height: 26px; font-size: 1em; font-weight: bold; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-light); }

.off-canvas-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.1); backdrop-filter: blur(4px); z-index: 1002; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.off-canvas-overlay.visible { opacity: 1; visibility: visible; }
.off-canvas-basket { position: fixed; top: 0; width: 100%; max-width: 420px; height: 100%; background: var(--bg-light); z-index: 1003; box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1); display: flex; flex-direction: column; transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.off-canvas-basket.visible { transform: translateX(0) !important; }

[dir="ltr"] .off-canvas-basket { right: 0; transform: translateX(100%); }
[dir="rtl"] .off-canvas-basket { left: 0; transform: translateX(-100%); }

.basket-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 32px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.basket-header h2 { margin: 0; color: var(--text-dark); font-size: 1.5em; font-weight: 700; }
.close-basket { font-size: 1.5em; cursor: pointer; border: none; background: transparent; color: var(--text-light); transition: color 0.2s ease, transform 0.2s ease; }
.close-basket:hover { color: var(--text-dark); transform: rotate(90deg); }
.basket-body { overflow-y: auto; flex-grow: 1; padding: 8px 32px; }
.basket-item { display: grid; grid-template-columns: 60px 1fr auto; align-items: start; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-color); }
.basket-item:last-child { border-bottom: none; }
.basket-item-img { width: 60px; height: 60px; object-fit: cover; border-radius: 12px; }
.basket-item-details { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.basket-item-name { font-weight: 600; color: var(--text-dark); margin-bottom: 0; line-height: 1.3; }
.basket-item-price { font-size: 1em; font-weight: 600; color: var(--text-dark); display: flex; align-items: baseline; flex-wrap: wrap; }
.quantity-control { display: flex; align-items: center; justify-content: start; border: 1px solid var(--border-color); border-radius: 20px; width: fit-content; }
.quantity-control .qty-btn { background: transparent; border: none; cursor: pointer; font-size: 1.2em; padding: 4px 12px; color: var(--text-light); transition: color 0.2s; }
.quantity-control .qty-btn:hover { color: var(--brand-primary); }
.quantity-control .item-quantity { font-weight: 600; padding: 0 4px; min-width: 20px; text-align: center; }
.basket-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.remove-item-btn { background: transparent; border: none; font-size: 1.2em; color: var(--text-light); cursor: pointer; padding: 0; line-height: 1; transition: color 0.2s; }
.remove-item-btn:hover { color: var(--danger-color); }
.original-price { text-decoration: line-through; color: var(--text-light); font-size: 0.85em; margin-left: 8px; }
.current-price { color: var(--danger-color); font-weight: 700; }
.basket-footer { padding: 24px 32px; border-top: 1px solid var(--border-color); background-color: var(--bg-main); flex-shrink: 0; }
.total-price-container { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.total-price-container span { font-size: 1.1em; color: var(--text-light); }
.total-price-container h3 { margin: 0; font-size: 1.6em; color: var(--text-dark); }
.checkout-btn { width: 100%; padding: 18px; background: var(--brand-primary); color: white; border: none; border-radius: 12px; font-weight: 600; font-size: 1.1em; cursor: pointer; text-decoration: none; display: block; text-align: center; transition: background-color 0.2s ease; }
.checkout-btn:hover { background-color: var(--text-dark); }
.continue-shopping { width: 100%; padding: 16px; background: transparent; color: var(--brand-primary); border: 2px solid var(--brand-primary); border-radius: 12px; font-weight: 600; font-size: 1.1em; cursor: pointer; text-decoration: none; display: block; text-align: center; transition: all 0.2s ease; margin-top: 12px; }
.continue-shopping:hover { background-color: var(--brand-primary); color: white; }
.basket-item.basket-item-error { background-color: #fff0f0; border-radius: 12px; padding-left: 10px; padding-right: 10px; margin-left: -10px; margin-right: -10px; }
.basket-item-warning { font-size: 0.8em; font-weight: 500; color: var(--danger-color, #F44336); margin-top: 8px; line-height: 1.4; width: 100%; }
.quantity-control-disabled .qty-btn, .quantity-control-disabled .item-quantity { color: #ccc; cursor: not-allowed; }

/* --- Footer --- */
.main-footer { background-color: var(--bg-light); color: var(--text-light); border-top: 1px solid var(--border-color); padding-top: 60px; margin-top: 60px; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; padding: 0 40px 40px 40px; max-width: 1400px; margin: 0 auto; }
.footer-section h3 { font-size: 1.3em; margin-bottom: 20px; color: var(--text-dark); }
.footer-section.about .logo-text { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.8em; color: var(--text-dark); }
.footer-section p { line-height: 1.8; }
.footer-section .socials a { margin: 0 15px 0 0; font-size: 1.6em; color: var(--text-light); }
.footer-section.links ul { list-style: none; padding: 0; }
.footer-section.links ul li a { display: block; margin-bottom: 12px; color: var(--text-light); }
.footer-bottom { background-color: var(--bg-main); text-align: center; padding: 20px; border-top: 1px solid var(--border-color); font-size: 0.9em; }

/* --- Floating Whatsapp --- */
.floating-whatsapp-container { 
  position: fixed; 
  bottom: 85px;
  z-index: 1001; 
  display: flex; 
  align-items: center; 
  gap: 10px; 
}
.floating-whatsapp-icon { background-color: #25D366; color: white; border-radius: 50%; width: 65px; height: 65px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: transform 0.2s ease; font-size: 2em; text-decoration: none; }
.floating-whatsapp-icon:hover { transform: scale(1.1); color: white; }
.whatsapp-tooltip { background-color: #fff; color: var(--text-dark); padding: 8px 15px; border-radius: 20px; font-size: 0.9em; font-weight: 600; box-shadow: var(--shadow-medium); white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease; transform: translateY(10px); }
.floating-whatsapp-container:hover .whatsapp-tooltip { opacity: 1; visibility: visible; transform: translateY(0); }

/* --- Notification Modal --- */
.notification-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.notification-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 90%; max-width: 400px; background: var(--bg-light); border-radius: 16px; padding: 30px; z-index: 2001; box-shadow: var(--shadow-medium); text-align: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.notification-modal-overlay.visible, .notification-modal.visible { opacity: 1; visibility: visible; }
.notification-modal.visible { transform: translate(-50%, -50%) scale(1); }
.notification-modal-close { position: absolute; top: 10px; right: 15px; background: transparent; border: none; font-size: 2em; color: var(--border-color); cursor: pointer; line-height: 1; }
.notification-modal-icon { font-size: 3em; color: var(--brand-primary); margin-bottom: 15px; }
.notification-modal h3 { font-family: 'Playfair Display', serif; font-size: 1.8em; font-weight: 700; color: var(--text-dark); margin: 0 0 10px 0; }
.notification-modal p { font-size: 1em; color: var(--text-dark); opacity: 0.8; margin: 0 0 25px 0; }
.notification-modal-subscribe { width: 100%; padding: 15px; background: var(--brand-primary); color: white; border: none; border-radius: 12px; font-weight: 600; font-size: 1.1em; cursor: pointer; transition: background-color 0.2s ease; }
.notification-modal-subscribe:hover { background-color: var(--text-dark); }

/* --- RTL & Mobile Overrides --- */
[dir="ltr"] .floating-basket-icon { right: 25px; }
[dir="rtl"] .floating-basket-icon { left: 25px; }
[dir="ltr"] .floating-whatsapp-container { right: 25px; flex-direction: row-reverse;}
[dir="rtl"] .floating-whatsapp-container { left: 25px; flex-direction: row-reverse;}
[dir="rtl"] { text-align: right; }
[dir="rtl"] .header-actions a { gap: 8px; }
[dir="rtl"] .basket-icon .basket-count { right: auto; left: -14px; }
[dir="rtl"] .search-bar .fa-search { right: 25px; left: auto; }
[dir="rtl"] .search-bar input { padding: 15px 60px 15px 25px; }
[dir="rtl"] .search-result-item img { margin-right: 0; margin-left: 15px; }
[dir="rtl"] .footer-section .socials a { margin: 0 0 0 15px; }
[dir="rtl"] .main-nav a { gap: 8px; }
[dir="rtl"] .quantity-control { justify-content: start; }
[dir="rtl"] .basket-item-actions { align-items: flex-start; }
[dir="rtl"] .original-price { margin-left: 0; margin-right: 8px; }

.mobile-button-grid, .mobile-only { display: none; }
.desktop-only { display: flex; }

@media (max-width: 992px) {
  .main-header { flex-wrap: wrap; }
  .main-nav, .desktop-only { display: none; }
  .mobile-only { display: flex; }
  .logo-container { order: 2; text-align: center; padding: 0; }
  .header-actions.header-left { order: 1; }
  .header-actions.header-right { order: 3; }
  .mobile-button-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin-top: 20px; }
  .mobile-button-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 5px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.8em; text-align: center; color: var(--text-dark); font-weight: 500; }
  .mobile-button-grid a i { font-size: 1.6em; margin-bottom: 8px; color: var(--brand-primary); }
  .search-section { padding: 15px 20px; gap: 10px; }
  main { padding: 20px; }
  .footer-content { padding: 0 20px 20px 20px; grid-template-columns: 1fr; text-align: center; }
  .footer-section .socials { justify-content: center; }
  .floating-basket-icon, .floating-whatsapp-container { display: flex !important; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .announcement-bar { flex-direction: column; gap: 8px; }
  .logo-container img { max-height: 60px; }
  .header-actions { gap: 15px; }
  main { padding: 15px; }
  .mobile-button-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .mobile-button-grid a { font-size: 0.7em; }
  .mobile-button-grid a i { font-size: 1.4em; }
  .off-canvas-basket { max-width: 90%; }
  [dir="ltr"] body.off-canvas-open #page-wrapper { left: -80px; }
  [dir="rtl"] body.off-canvas-open #page-wrapper { left: 80px; }
  .main-group-slider-container { padding: 10px 0; }
  .main-group-slide { flex: 0 0 75px; }
  .main-group-slide .img-wrapper { width: 60px; height: 60px; }
  .main-group-slide span { font-size: 0.75em; }
  .floating-basket-icon, .floating-whatsapp-icon { width: 55px; height: 55px; }
  .floating-basket-icon { bottom: 85px; }
  .floating-whatsapp-container { bottom: 85px; }
}

/* --- Loader --- */
.loader { border: 5px solid #f3f3f3; border-top: 5px solid var(--brand-secondary); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 60px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Product Cards --- */
.product-card { background: var(--bg-light); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; text-align: center; transition: transform 0.2s, box-shadow 0.2s; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-medium); }
.product-card a { text-decoration: none; color: inherit; }
.product-card-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; padding: 0; }
.product-card-info { padding: 15px; }
.product-card-info h4 { margin: 0 0 10px 0; font-size: 1em; min-height: 40px; }
.product-card-info .price { color: var(--brand-primary); font-weight: bold; }

/* --- Hero Section & Slideshow --- */
.hero-section {
  position: relative;
  width: 100%;
  height: 500px; 
  overflow: hidden;
  margin-bottom: 40px;
}

.hero-slider {
  width: 100%;
  height: 100%;
}

.hero-slide {
  width: 100%;
  height: 100%;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
}

.hero-slide.active {
  display: block;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  object-position: center;
  display: block;
}

@media (max-width: 768px) {
  .hero-section {
    height: 250px; 
    margin-bottom: 20px;
  }
}