
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;600;700;800&display=swap');

:root {
    --wine: #641b28;
    --wine2: #7c2635;
    --cream: #fff1df;
    --sand: #f1dfcb;
    --ink: #351b1d;
    --muted: #8d6c65;
    --line: #e7cdb8;
    --white: #fffaf3;
    --gold: #e7c7a5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: Tajawal, sans-serif;
}

button,
input {
    font: inherit;
}

.wrap {
    max-width: 1320px;
    margin: auto;
    padding: 0 22px;
}

.hero {
    background: radial-gradient(ellipse at 50% -25%, #a34856 0, transparent 55%), linear-gradient(115deg, #4b101d, #681b2a 55%, #3e101b);
    color: var(--cream);
    padding: 22px 0 26px;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid #e7c8ad;
}

.hero:before,
.hero:after {
    content: "";
    position: absolute;
    border: 1px solid #d7a98b55;
    border-radius: 50%;
    width: 360px;
    height: 360px;
    top: -240px;
}

.hero:before {
    left: -100px;
}

.hero:after {
    right: -100px;
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 58px;
    height: 58px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 30px;
    color: var(--gold);
}

.brand h1 {
    font-size: 23px;
    margin: 0;
    letter-spacing: 2px;
}

.brand small {
    display: block;
    font: 12px Georgia, serif;
    letter-spacing: 4px;
    color: #e7c7a5;
    margin-top: 5px;
}

.actions {
    display: flex;
    gap: 8px;
}

.pill {
    border: 1px solid #e7c7a580;
    background: #ffffff12;
    color: inherit;
    border-radius: 999px;
    padding: 9px 15px;
    cursor: pointer;
}

.intro {
    padding: 26px 0 8px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.intro .eyebrow {
    letter-spacing: 2px;
    font-size: 11px;
    color: #e9c9a8;
}

.intro h2 {
    font-size: clamp(28px, 5vw, 43px);
    margin: 8px 0;
    line-height: 1.2;
}

.intro p {
    color: #f1dccc;
    line-height: 1.8;
    margin: 0;
}

.hero-img {
    display: none;
}

.main {
    padding: 25px 0 65px;
}

/* ترتيب العنوان والبحث */
.toolbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
    width: 100%;
}

.toolbar > div {
    width: 100%;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 10px;
    width: 100%;
}

.section-head h3 {
    font-size: 23px;
    margin: 0;
    color: var(--wine);
}

.section-head span {
    font-size: 12px;
    color: var(--muted);
}

/* مربع البحث */
.search {
    width: 100%;
    max-width: 520px;
    min-width: 0;
    flex: none;
    border: 1px solid var(--line);
    background: #fffaf4;
    border-radius: 14px;
    padding: 13px 16px;
    color: var(--ink);
}

/* التصنيفات */
.cats {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 0 22px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cats::-webkit-scrollbar {
    display: none;
}

.cat {
    flex: 0 0 auto;
    white-space: nowrap;
    border: 1px solid #d9b9a2;
    background: #fff9f0;
    border-radius: 999px;
    padding: 11px 18px;
    color: var(--wine);
    cursor: pointer;
}

.cat.active {
    background: var(--wine);
    color: #fff3e4;
    border-color: var(--wine);
}

/* المنتجات */
.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 7px 22px #5a1a2510;
    transition: transform .2s;
}

.card:hover {
    transform: translateY(-3px);
}

.photo {
    height: 220px;
    background: linear-gradient(135deg, #e9d1b8, #fff0df);
    display: block;
    position: relative;
    overflow: hidden;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo .photo-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff8efdf;
    color: #762b32;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: bold;
}

.photo:after {
    content: "TULIP COFFEE";
    position: absolute;
    bottom: 10px;
    left: 12px;
    font: 10px Georgia, serif;
    letter-spacing: 2px;
    color: #8b4a45aa;
}

.details {
    padding: 13px 15px 15px;
}

.names {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: start;
}

.names h4 {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

.names .en {
    font-size: 11px;
    color: var(--muted);
    direction: ltr;
    text-align: right;
    margin-top: 3px;
}

.desc {
    font-size: 11px;
    color: var(--muted);
    margin: 8px 0 10px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    border-top: 1px solid #f0e5dc;
    padding-top: 10px;
    font-size: 13px;
}

.price {
    font-weight: bold;
    color: var(--wine);
}

.sizes {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.size {
    background: #f8eee6;
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 11px;
}

/* الفوتر */
.footer {
    background: #4e1421;
    color: #f9e9df;
    padding: 25px 0;
    border-top: 4px solid #d9b28f;
}

.footrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.wa {
    background: #fff1df;
    color: #64232b;
    text-decoration: none;
    padding: 12px 17px;
    border-radius: 999px;
    font-weight: bold;
}

.note {
    font-size: 11px;
    color: #d8bdb0;
    line-height: 1.7;
}

/* زر إدارة القائمة - أيقونة علوية */
.admin-fab {
    position: fixed;
    top: 18px;
    left: 18px;
    bottom: auto;
    z-index: 1000;

    width: 46px;
    height: 46px;
    padding: 0;

    display: grid;
    place-items: center;

    background: #fff1df;
    color: #641b28;
    border: 1px solid #e7c7a5;
    border-radius: 50%;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);

    cursor: pointer;
    transition: all 0.22s ease;
}

.admin-fab svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-fab:hover {
    background: #641b28;
    color: #fff1df;
    transform: rotate(25deg);
}

.admin-fab:focus-visible {
    outline: 3px solid #e7c7a5;
    outline-offset: 3px;
}

/* الجوال */
@media (max-width: 680px) {
    .admin-fab {
        top: 12px;
        left: 12px;
        width: 42px;
        height: 42px;
    }

    .admin-fab svg {
        width: 19px;
        height: 19px;
    }
}

/* الشاشات المتوسطة */
@media (max-width: 950px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .photo {
        height: 185px;
    }
}

/* الجوال */
@media (max-width: 680px) {
    .wrap {
        padding: 0 14px;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .photo {
        height: 150px;
    }

    .intro {
        padding-top: 20px;
    }

    .details {
        padding: 10px;
    }

    .names h4 {
        font-size: 13px;
    }

    .main {
        padding-top: 20px;
    }

    .toolbar {
        gap: 12px;
    }

    .section-head {
        margin-bottom: 8px;
    }

    .section-head h3 {
        font-size: 22px;
    }

    .search {
        max-width: none;
        width: 100%;
    }

    .cats {
        padding: 14px 0 20px;
        gap: 8px;
    }

    .cat {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* الشاشات الصغيرة جدًا */
@media (max-width: 390px) {
    .grid {
        grid-template-columns: 1fr 1fr;
    }

    .photo {
        height: 125px;
    }

    .brand h1 {
        font-size: 18px;
    }
}

/* تحسين وضوح نصوص المنتجات */
.card h3 {
    font-size: 17px;
    font-weight: 800;
    color: #351b1d;
}

.card .en {
    font-size: 13px;
    font-weight: 500;
    color: #76504a;
}

.card .price {
    font-size: 19px;
    font-weight: 800;
    color: #641b28;
}

/* توسيط قسم القائمة بالكامل */
.toolbar {
    align-items: center;
    text-align: center;
}

.toolbar > div {
    width: 100%;
}

.section-head {
    justify-content: center;
    gap: 12px;
}

.search {
    width: min(100%, 520px);
    max-width: 520px;
    text-align: center;
    align-self: center;
}

.cats {
    justify-content: center;
}

/* الجوال */
@media (max-width: 680px) {
    .cats {
        justify-content: flex-start;
    }
}

.intro h2,
.section-head h3 {
    font-weight: 800;
}

.cat,
.search,
.names h4,
.price {
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
}

/* Family Boxes Section */
.family-box {
    margin-top: 35px;
    padding: 28px;
    background: #fffaf3;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 7px 22px #5a1a2510;
}

.family-box-header {
    text-align: center;
    margin-bottom: 25px;
}

.family-tag {
    color: var(--muted);
    font: 11px Georgia, serif;
    letter-spacing: 3px;
}

.family-box-header h2 {
    color: var(--wine);
    font-size: 27px;
    margin: 9px 0;
    font-weight: 800;
}

.family-box-header p {
    color: var(--muted);
    margin: 0;
    font-size: 14px;
}

.family-box-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.family-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 17px;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.family-item h3 {
    color: var(--ink);
    margin: 0 0 5px;
    font-size: 16px;
}

.family-item span {
    color: var(--muted);
    font-size: 12px;
}

.family-item strong {
    color: var(--wine);
    font-size: 21px;
    white-space: nowrap;
}

.family-item small {
    font-size: 11px;
}

@media (max-width: 680px) {
    .family-box {
        padding: 18px 13px;
        margin-top: 25px;
    }

    .family-box-list {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .family-item {
        padding: 14px;
    }
}

.family-item-image {
    width: 220px;
    height: 165px;
    object-fit: contain;
    border-radius: 14px;
    flex-shrink: 0;
}

/* للجوال */
@media (max-width: 680px) {
    .family-item-image {
        width: 145px;
        height: 125px;
    }
}

/* Add these styles at the END of css/style.css. */
.admin-panel {
  width: min(780px, 100%);
  max-height: 92vh;
  padding: 22px;
  overflow-y: auto;
}
.admin-heading,
.admin-workspace-heading,
.admin-list-heading,
.admin-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-heading h3 { margin: 0; }
.admin-subtitle,
.admin-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 5px 0 0;
}
.admin-status {
  background: #f7eee6;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: #6b675f;
  font-size: 13px;
  line-height: 1.7;
  margin: 15px 0;
}
.admin-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  margin: 14px 0;
}
.admin-form h4,
.admin-workspace-heading h4,
.admin-list-heading h4 {
  margin: 0 0 12px;
  color: var(--wine);
}
.admin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-field {
  display: grid;
  gap: 6px;
  margin: 9px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.admin-field input,
.admin-field select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffaf4;
  color: var(--ink);
  padding: 10px 11px;
  font: inherit;
  font-size: 13px;
}
.admin-field input:focus,
.admin-field select:focus {
  outline: 2px solid #b77c83;
  outline-offset: 1px;
}
.smallbtn.primary {
  background: var(--wine);
  color: #fff1df;
}
.smallbtn.danger {
  background: #f7e4e2;
  color: #a12636;
}
.smallbtn:disabled { opacity: .6; cursor: wait; }
.admin-products-list {
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.admin-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}
.admin-product-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.admin-product-info strong {
  color: var(--wine);
  font-size: 13px;
}
.admin-product-info span,
.admin-product-info small {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.admin-product-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}
.admin-empty {
  color: var(--muted);
  text-align: center;
  padding: 20px;
}
@media (max-width: 600px) {
  .admin-panel { padding: 15px; }
  .admin-fields { grid-template-columns: 1fr; gap: 4px; }
  .admin-product-row { align-items: flex-start; }
  .admin-product-actions { flex-direction: column; }
}

/* TULIP - Product Edit Mode */

#productForm.is-editing {
    background: #fff6e8;
    border: 2px solid #9b6b32;
    border-right: 6px solid #641b28;
    box-shadow: 0 5px 18px rgba(100, 27, 40, 0.12);
}

#productForm.is-editing #productFormTitle {
    color: #641b28;
    font-size: 19px;
}

.product-edit-notice {
    background: #f4e5c9;
    border: 1px solid #c69a58;
    border-radius: 10px;
    padding: 13px;
    margin: 12px 0 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.product-edit-notice[hidden] {
    display: none;
}

.edit-badge {
    background: #641b28;
    color: #fff1df;
    padding: 5px 10px;
    border-radius: 6px;
    width: fit-content;
    font-size: 12px;
    font-weight: bold;
}

.product-edit-notice strong {
    color: #641b28;
    font-size: 16px;
}

.product-edit-notice p {
    color: #795f45;
    font-size: 12px;
    margin: 0;
}

/* =================================
   TULIP COFFEE - Custom Confirm Modal
================================= */

.tulip-confirm-backdrop[hidden] {
    display: none !important;
}

.tulip-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(40, 17, 20, 0.68);
    backdrop-filter: blur(5px);
    animation: tulipFadeIn 0.2s ease;
}

.tulip-confirm-card {
    width: 100%;
    max-width: 420px;
    background: #fff8f0;
    border: 1px solid #e7c5a9;
    border-radius: 22px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 65px rgba(35, 10, 15, 0.3);
    animation: tulipModalIn 0.25s ease;
}

.tulip-confirm-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1dfd2;
    border: 1px solid #d9b49b;
    color: #641b28;
    font-size: 30px;
    font-weight: bold;
}

.tulip-confirm-label {
    color: #a17b69;
    font-size: 10px;
    letter-spacing: 3px;
    font-weight: bold;
}

.tulip-confirm-card h3 {
    color: #641b28;
    font-size: 21px;
    margin: 12px 0;
}

.tulip-confirm-card p {
    color: #755d54;
    font-size: 14px;
    line-height: 1.9;
    margin: 10px 0 22px;
}

.tulip-confirm-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.tulip-confirm-actions button {
    flex: 1;
    min-height: 44px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    transition: 0.2s ease;
}

#tulipConfirmCancel {
    background: #f0e2d8;
    color: #641b28;
}

#tulipConfirmOk {
    background: #641b28;
    color: #fff1df;
}

.tulip-confirm-actions button:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

@keyframes tulipFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes tulipModalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .tulip-confirm-card {
        padding: 23px 18px;
        border-radius: 18px;
    }

    .tulip-confirm-card h3 {
        font-size: 19px;
    }
}

/* TULIP - Permanent Delete Warning */

.tulip-confirm-card.is-danger .tulip-confirm-icon {
    background: #f6dfe0;
    border-color: #d89da3;
    color: #a12636;
}

.tulip-confirm-card.is-danger #tulipConfirmOk {
    background: #a12636;
    color: #fff;
}

.tulip-confirm-card.is-danger #tulipConfirmOk:hover {
    background: #821a2b;
}

/* =================================
   TULIP ADMIN - NAVIGATION TABS
================================= */

.admin-tabs {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 8px;
    margin: 18px 0 22px;
    box-sizing: border-box;

    background: #f7e9df;
    border: 1px solid #e7c9b5;
    border-radius: 14px;
}

.admin-tab {
    flex: 1;
    min-height: 48px;
    padding: 11px 18px;

    border: 1px solid transparent;
    border-radius: 10px;

    background: transparent;
    color: #641b28;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}

/* التبويب النشط */
.admin-tab.active {
    background: #641b28;
    color: #fff1df;

    border-color: #641b28;

    box-shadow: 0 4px 12px rgba(100, 27, 40, 0.2);
}

/* التبويب غير النشط */
.admin-tab:not(.active):hover {
    background: #f0ded1;
    border-color: #dcbda8;
    transform: translateY(-1px);
}

/* تأثير الضغط */
.admin-tab:active {
    transform: scale(0.98);
}

/* إخفاء الأقسام غير المختارة */
.admin-section[hidden] {
    display: none !important;
}

/* حركة ظهور القسم */
.admin-section:not([hidden]) {
    animation: tulipSectionIn 0.25s ease both;
}

@keyframes tulipSectionIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* الهواتف */
@media (max-width: 480px) {
    .admin-tabs {
        gap: 6px;
        padding: 6px;
    }

    .admin-tab {
        min-height: 44px;
        padding: 9px 8px;
        font-size: 13px;
    }
}

/* =====================================
   TULIP ADMIN - PRODUCTS TABLE DESIGN
===================================== */

.admin-table-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    flex-wrap: wrap;
}

.admin-table-toolbar input,
.admin-table-toolbar select {
    min-height: 42px;
    border: 1px solid #e7cdb8;
    border-radius: 10px;
    padding: 9px 13px;
    background: #fffaf4;
    color: #351b1d;
    font-family: inherit;
    outline: none;
}

#adminProductSearch {
    flex: 1 1 230px;
    min-width: 160px;
}

#adminProductStatusFilter {
    flex: 0 1 190px;
    cursor: pointer;
}

.admin-table-toolbar input:focus,
.admin-table-toolbar select:focus {
    border-color: #641b28;
    box-shadow: 0 0 0 3px #641b2815;
}

/* Table container */

.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: #fffaf4;
    border: 1px solid #e7cdb8;
    border-radius: 13px;
    margin-top: 10px;
}

.admin-products-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    table-layout: fixed;
    direction: rtl;
}

/* Table headings */

.admin-products-table thead {
    background: #f3e4d9;
}

.admin-products-table th {
    padding: 15px 12px;
    color: #641b28;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.admin-products-table th:nth-child(1) {
    width: 29%;
}

.admin-products-table th:nth-child(2) {
    width: 14%;
}

.admin-products-table th:nth-child(3) {
    width: 13%;
}

.admin-products-table th:nth-child(4) {
    width: 44%;
}

/* Table rows */

.admin-products-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #eee0d4;
    vertical-align: middle;
    font-size: 13px;
    text-align: right;
}

.admin-products-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-products-table tbody tr {
    transition: background 0.2s ease;
}

.admin-products-table tbody tr:hover {
    background: #fbf0e6;
}

/* Product name */

.admin-table-product {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-table-product strong {
    color: #351b1d;
    font-size: 14px;
}

.admin-table-product small {
    color: #8d6c65;
    font-size: 11px;
    text-align: right;
}

/* Price */

.admin-table-price {
    color: #641b28;
    font-weight: 800;
    white-space: nowrap;
}

/* Status */

.admin-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.admin-status-pill.is-active {
    background: #e3f1e6;
    color: #287144;
}

.admin-status-pill.is-hidden {
    background: #f5e3e2;
    color: #9b3940;
}

/* Actions */

.admin-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.admin-table-actions .smallbtn {
    padding: 7px 9px;
    font-size: 11px;
    white-space: nowrap;
}

.admin-table-actions .danger {
    background: #f7e4e1;
    color: #a12636;
}

.admin-table-actions button:hover {
    filter: brightness(0.96);
}

/* Pagination */

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.admin-pagination-info {
    color: #8d6c65;
    font-size: 12px;
}

.admin-pagination-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.admin-pagination-buttons button {
    min-width: 34px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #e7cdb8;
    border-radius: 8px;
    background: #fffaf4;
    color: #641b28;
    font-family: inherit;
    cursor: pointer;
}

.admin-pagination-buttons button.active {
    background: #641b28;
    border-color: #641b28;
    color: #fff1df;
}

.admin-pagination-buttons button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.admin-pagination-buttons button:not(:disabled):hover {
    background: #f0dfd3;
}

/* Empty results */

.admin-empty {
    text-align: center;
    padding: 25px;
    color: #8d6c65;
}

/* Mobile */

@media (max-width: 600px) {
    .admin-table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    #adminProductSearch,
    #adminProductStatusFilter {
        width: 100%;
        flex: 1;
    }

    .admin-pagination {
        flex-direction: column;
        align-items: center;
    }

    .admin-pagination-buttons {
        justify-content: center;
    }
}

/* TULIP - Smooth Product Form */

.admin-collapsible-panel[hidden] {
    display: none !important;
}

.admin-collapsible-panel {
    transform-origin: top;
    margin-top: 12px;
}

.admin-add-toggle {
    min-height: 42px;
    padding: 10px 17px;
    font-weight: 700;
    border-radius: 10px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.admin-add-toggle:hover {
    background: #7c2635;
    color: #fff1df;
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .admin-add-toggle {
        transition: none;
    }
}

/* =====================================
   TULIP - Elegant & Aligned Action Buttons
===================================== */

/* ترتيب الأزرار */
.admin-table-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(78px, 1fr));
    gap: 7px;
    align-items: center;
    width: 100%;
    min-width: 250px;
}

/* توحيد الحجم والشكل */
.admin-table-actions .smallbtn {
    width: 100%;
    min-height: 36px;
    padding: 8px 5px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid transparent;
    border-radius: 9px;

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* تعديل */
.admin-table-actions [data-edit-product] {
    background: #f0e2d6;
    color: #641b28;
    border-color: #e8d0bf;
}

/* إخفاء */
.admin-table-actions [data-hide-product] {
    background: #f8eee5;
    color: #93613f;
    border-color: #eed8c5;
}

/* إظهار */
.admin-table-actions [data-restore-product] {
    background: #e5f1e7;
    color: #287144;
    border-color: #cce3d0;
}

/* الحذف النهائي */
.admin-table-actions [data-permanent-delete] {
    background: #f8e6e5;
    color: #a12636;
    border-color: #efcecb;
}

/* تأثير المرور */
.admin-table-actions .smallbtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(65, 25, 30, 0.09);
    filter: brightness(0.97);
}

/* تأثير الضغط */
.admin-table-actions .smallbtn:active {
    transform: scale(0.97);
}

/* التركيز بلوحة المفاتيح */
.admin-table-actions .smallbtn:focus-visible {
    outline: 2px solid #641b28;
    outline-offset: 2px;
}

/* =====================================
   TULIP - FAMILY BOX ACTION BUTTONS
===================================== */

/* ترتيب أزرار البوكسات */
#adminFamilyBoxesList .admin-product-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(78px, 1fr));
    gap: 7px;
    align-items: center;
    width: 100%;
    max-width: 300px;
}

/* توحيد الأحجام */
#adminFamilyBoxesList .admin-product-actions .smallbtn {
    width: 100%;
    min-height: 36px;
    padding: 8px 5px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid transparent;
    border-radius: 9px;

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* تعديل */
#adminFamilyBoxesList [data-edit-family-box] {
    background: #f0e2d6;
    color: #641b28;
    border-color: #e8d0bf;
}

/* إخفاء */
#adminFamilyBoxesList [data-hide-family-box] {
    background: #f8eee5;
    color: #93613f;
    border-color: #eed8c5;
}

/* إظهار */
#adminFamilyBoxesList [data-restore-family-box] {
    background: #e5f1e7;
    color: #287144;
    border-color: #cce3d0;
}

/* حذف نهائي */
#adminFamilyBoxesList [data-delete-family-box] {
    background: #f8e6e5;
    color: #a12636;
    border-color: #efcecb;
}

/* تأثيرات الحركة */
#adminFamilyBoxesList .admin-product-actions .smallbtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(65, 25, 30, 0.09);
    filter: brightness(0.97);
}

#adminFamilyBoxesList .admin-product-actions .smallbtn:active {
    transform: scale(0.97);
}

#adminFamilyBoxesList .admin-product-actions .smallbtn:focus-visible {
    outline: 2px solid #641b28;
    outline-offset: 2px;
}

/* الجوال */
@media (max-width: 480px) {
    #adminFamilyBoxesList .admin-product-actions {
        grid-template-columns: repeat(3, minmax(65px, 1fr));
        gap: 5px;
    }

    #adminFamilyBoxesList .admin-product-actions .smallbtn {
        font-size: 10px;
        padding: 7px 3px;
    }
}

/* TULIP - Clear & Elegant Product Prices */

.sizes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.size {
    background: #f3e3d6;
    border: 1px solid #e4c6b0;
    color: #641b28;

    padding: 8px 12px;
    border-radius: 10px;

    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
}

/* Mobile */
@media (max-width: 480px) {
    .size {
        font-size: 12px;
        padding: 7px 9px;
    }
}

/* =====================================
   TULIP MOBILE POLISH — NOV 2026
   ===================================== */

/* Keep the header contents inside the viewport in both Arabic and English. */
.top,
.brand,
.actions {
    min-width: 0;
}

.brand img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* The admin entry now lives in the footer, so it no longer covers menu cards. */
.admin-fab {
    position: static;
    inset: auto;
    flex: 0 0 auto;
    background: #fffaf3;
    color: var(--wine);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 17px;
    box-shadow: 0 3px 12px #00000010;
    font-weight: 700;
    white-space: nowrap;
}

.admin-fab:hover {
    background: #f7e9df;
}

@media (max-width: 680px) {
    /* Center the logo and language control to avoid LTR/RTL clipping. */
    .top {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
    }

    .brand {
        width: 100%;
        justify-content: center;
    }

    .brand img {
        width: min(180px, 58vw) !important;
        max-width: 100%;
    }

    .actions {
        width: 100%;
        justify-content: center;
    }

    .intro {
        width: 100%;
        padding: 22px 0 10px;
    }

    .intro h2 {
        font-size: clamp(27px, 7vw, 34px);
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .intro p {
        font-size: 15px;
        overflow-wrap: anywhere;
    }

    /* Product and family-box tables become readable cards on phones. */
    .admin-table-wrapper {
        overflow: visible;
        border: 0;
        background: transparent;
        margin-top: 10px;
    }

    .admin-products-table {
        display: block;
        width: 100%;
        min-width: 0;
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0;
    }

    .admin-products-table thead {
        display: none;
    }

    .admin-products-table tbody {
        display: grid;
        gap: 11px;
        width: 100%;
    }

    .admin-products-table tbody tr {
        display: block;
        width: 100%;
        padding: 8px 12px;
        background: #fffaf4;
        border: 1px solid var(--line);
        border-radius: 13px;
        box-shadow: 0 3px 10px #5a1a2508;
    }

    .admin-products-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        min-width: 0;
        padding: 9px 0;
        border: 0;
        border-bottom: 1px solid #f0e5dc;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .admin-products-table td::before {
        flex: 0 0 67px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
    }

    .admin-products-table td:nth-child(1)::before { content: "المنتج"; }
    .admin-products-table td:nth-child(2)::before { content: "السعر"; }
    .admin-products-table td:nth-child(3)::before { content: "الحالة"; }

    .admin-products-table td:nth-child(4) {
        display: block;
        padding-bottom: 2px;
        border-bottom: 0;
    }

    .admin-products-table td:nth-child(4)::before {
        display: block;
        margin-bottom: 8px;
        content: "الإجراءات";
    }

    .admin-table-product {
        min-width: 0;
        flex: 1 1 auto;
    }

    .admin-table-price {
        white-space: nowrap;
    }

    .admin-table-actions,
    #adminFamilyBoxesList .admin-product-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        min-width: 0;
        max-width: none;
        gap: 6px;
    }

    .admin-table-actions .smallbtn,
    #adminFamilyBoxesList .admin-product-actions .smallbtn {
        min-width: 0;
        min-height: 38px;
        padding: 7px 3px;
        font-size: 11px;
        white-space: nowrap;
    }

    /* Avoid repeating the panel title above the logout button. */
    #adminWorkspace > .admin-workspace-heading h4 {
        display: none;
    }

    #adminWorkspace > .admin-workspace-heading {
        justify-content: flex-start;
    }

    .admin-pagination {
        gap: 8px;
    }

    .admin-pagination-buttons {
        gap: 4px;
    }
}

@media (max-width: 390px) {
    .admin-panel {
        padding: 12px;
    }

    .admin-table-actions .smallbtn,
    #adminFamilyBoxesList .admin-product-actions .smallbtn {
        font-size: 10px;
    }
}


/* =====================================
   TULIP - Fix English Hero on Mobile
   ===================================== */

/* ضبط قسم المقدمة */
html[dir="ltr"] .hero {
    width: 100%;
    overflow: hidden;
}

html[dir="ltr"] .hero .wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

html[dir="ltr"] .intro {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding-inline: 14px;
    text-align: center;
    direction: ltr;
}

html[dir="ltr"] .intro h2 {
    width: 100%;
    max-width: 650px;
    margin: 12px auto;
    padding: 0;
    font-size: clamp(25px, 5vw, 43px);
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: normal;
    text-align: center;
}

html[dir="ltr"] .intro p {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    font-size: 16px;
    line-height: 1.8;
    overflow-wrap: break-word;
    text-align: center;
}

/* ضبط الشعار */
html[dir="ltr"] .top {
    width: 100%;
    min-width: 0;
}

html[dir="ltr"] .brand {
    min-width: 0;
    max-width: 100%;
}

html[dir="ltr"] .brand img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* تحسين عرض الجوال */
@media (max-width: 680px) {

    html[dir="ltr"] .top {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px;
    }

    html[dir="ltr"] .brand {
        width: 100%;
        justify-content: center;
    }

    html[dir="ltr"] .brand img {
        width: min(190px, 65vw) !important;
        max-width: 100%;
    }

    html[dir="ltr"] .actions {
        width: 100%;
        justify-content: center;
    }

    html[dir="ltr"] .intro {
        padding: 24px 18px 16px;
    }

    html[dir="ltr"] .intro h2 {
        font-size: clamp(25px, 7vw, 32px);
        line-height: 1.3;
        max-width: 100%;
    }

    html[dir="ltr"] .intro p {
        font-size: 15px;
        line-height: 1.8;
    }
}


/* =================================
   TULIP ADMIN - Header Buttons
   ================================= */

/* زر إغلاق لوحة الإدارة */
.admin-close-btn {
    background: #641b28 !important;
    color: #fff1df !important;
    border: 1px solid #641b28 !important;
    border-radius: 12px !important;
    padding: 11px 22px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: 0.2s ease;
}

.admin-close-btn:hover {
    background: #48121d !important;
    transform: translateY(-2px);
}

/* زر تسجيل الخروج */
.admin-logout-btn {
    background: #a8323e !important;
    color: #ffffff !important;
    border: 1px solid #a8323e !important;
    border-radius: 12px !important;
    padding: 11px 22px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: 0.2s ease;
}

.admin-logout-btn:hover {
    background: #84232e !important;
    transform: translateY(-2px);
}

/* تأثير التركيز */
.admin-close-btn:focus-visible,
.admin-logout-btn:focus-visible {
    outline: 3px solid #e7c7a5;
    outline-offset: 3px;
}

/* تحسين حجم الأزرار على الجوال */
@media (max-width: 680px) {
    .admin-close-btn,
    .admin-logout-btn {
        min-height: 44px;
        padding: 10px 18px !important;
        font-size: 14px !important;
    }
}


/* تصغير وتنسيق أزرار الإضافة */
#toggleProductFormBtn,
#toggleFamilyBoxFormBtn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    width: auto;
    max-width: 100%;
    min-height: 40px;

    padding: 8px 16px !important;
    font-size: 15px !important;
    line-height: 1.4;

    margin: 14px 0 26px auto !important;
    border-radius: 11px;
}

/* منع تداخل عنوان قائمة المنتجات والبوكسات */
.admin-list-heading {
    margin-top: 12px;
    clear: both;
}

/* تحسين إضافي للجوال */
@media (max-width: 680px) {
    #toggleProductFormBtn,
    #toggleFamilyBoxFormBtn {
        padding: 8px 14px !important;
        font-size: 14px !important;
        min-height: 38px;
    }

    .admin-list-heading {
        margin-top: 16px;
    }
}


/* =====================================
   TULIP - Clear Product & Family Forms
   ===================================== */

/* الشكل الأساسي للنموذجين */
#productForm,
#familyBoxForm {
    display: block;
    width: 100%;
    padding: 22px !important;
    margin: 18px 0 26px !important;
    border: 1px solid #e5cbb8 !important;
    border-radius: 17px !important;
    background: #fffaf4 !important;
    box-shadow: 0 5px 18px rgba(100, 27, 40, 0.08);
}

/* نموذج إضافة المنتج */
#productForm {
    border-top: 6px solid #641b28 !important;
}

/* عنوان نموذج المنتج */
#productFormTitle {
    color: #641b28;
    font-size: 21px;
    font-weight: 800;
    padding-bottom: 14px;
    border-bottom: 1px solid #ead7c8;
    margin-bottom: 18px;
}

/* نموذج إضافة بوكس العائلة */
#familyBoxForm {
    border-top: 6px solid #b68a50 !important;
    background: #fffaf1 !important;
}

/* عنوان نموذج البوكس */
#familyBoxFormTitle {
    color: #91632e;
    font-size: 21px;
    font-weight: 800;
    padding-bottom: 14px;
    border-bottom: 1px solid #ead8b9;
    margin-bottom: 18px;
}

/* ترتيب الحقول */
#productForm .admin-fields,
#familyBoxForm .admin-fields {
    gap: 16px;
    margin-bottom: 12px;
}

/* عناوين الحقول */
#productForm .admin-field,
#familyBoxForm .admin-field {
    gap: 8px;
    margin: 12px 0;
    font-size: 14px;
    font-weight: 700;
}

/* مربعات الإدخال */
#productForm .admin-field input,
#productForm .admin-field select,
#familyBoxForm .admin-field input,
#familyBoxForm .admin-field select {
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid #dfc6b2;
    border-radius: 11px;
    background: #fffdf9;
    font-size: 14px;
}

/* تأثير التركيز */
#productForm .admin-field input:focus,
#productForm .admin-field select:focus,
#familyBoxForm .admin-field input:focus,
#familyBoxForm .admin-field select:focus {
    outline: none;
    border-color: #641b28;
    box-shadow: 0 0 0 3px rgba(100, 27, 40, 0.10);
}

/* أزرار الحفظ */
#productForm .admin-form-actions,
#familyBoxForm .admin-form-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ead7c8;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* تحسين الجوال */
@media (max-width: 680px) {
    #productForm,
    #familyBoxForm {
        padding: 15px !important;
        margin: 14px 0 22px !important;
    }

    #productFormTitle,
    #familyBoxFormTitle {
        font-size: 19px;
    }

    #productForm .admin-fields,
    #familyBoxForm .admin-fields {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}



/* =====================================
   TULIP - Clear Product & Family Forms
   ===================================== */

/* الشكل الأساسي للنموذجين */
#productForm,
#familyBoxForm {
    display: block;
    width: 100%;
    padding: 22px !important;
    margin: 18px 0 26px !important;
    border: 1px solid #e5cbb8 !important;
    border-radius: 17px !important;
    background: #fffaf4 !important;
    box-shadow: 0 5px 18px rgba(100, 27, 40, 0.08);
}

/* نموذج إضافة المنتج */
#productForm {
    border-top: 6px solid #641b28 !important;
}

/* عنوان نموذج المنتج */
#productFormTitle {
    color: #641b28;
    font-size: 21px;
    font-weight: 800;
    padding-bottom: 14px;
    border-bottom: 1px solid #ead7c8;
    margin-bottom: 18px;
}

/* نموذج إضافة بوكس العائلة */
#familyBoxForm {
    border-top: 6px solid #b68a50 !important;
    background: #fffaf1 !important;
}

/* عنوان نموذج البوكس */
#familyBoxFormTitle {
    color: #91632e;
    font-size: 21px;
    font-weight: 800;
    padding-bottom: 14px;
    border-bottom: 1px solid #ead8b9;
    margin-bottom: 18px;
}

/* ترتيب الحقول */
#productForm .admin-fields,
#familyBoxForm .admin-fields {
    gap: 16px;
    margin-bottom: 12px;
}

/* عناوين الحقول */
#productForm .admin-field,
#familyBoxForm .admin-field {
    gap: 8px;
    margin: 12px 0;
    font-size: 14px;
    font-weight: 700;
}

/* مربعات الإدخال */
#productForm .admin-field input,
#productForm .admin-field select,
#familyBoxForm .admin-field input,
#familyBoxForm .admin-field select {
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid #dfc6b2;
    border-radius: 11px;
    background: #fffdf9;
    font-size: 14px;
}

/* تأثير التركيز */
#productForm .admin-field input:focus,
#productForm .admin-field select:focus,
#familyBoxForm .admin-field input:focus,
#familyBoxForm .admin-field select:focus {
    outline: none;
    border-color: #641b28;
    box-shadow: 0 0 0 3px rgba(100, 27, 40, 0.10);
}

/* أزرار الحفظ */
#productForm .admin-form-actions,
#familyBoxForm .admin-form-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ead7c8;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* تحسين الجوال */
@media (max-width: 680px) {
    #productForm,
    #familyBoxForm {
        padding: 15px !important;
        margin: 14px 0 22px !important;
    }

    #productFormTitle,
    #familyBoxFormTitle {
        font-size: 19px;
    }

    #productForm .admin-fields,
    #familyBoxForm .admin-fields {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}


/* TULIP - Dropdown Actions Menu */

.admin-actions-menu {
    display: inline-block;
    position: relative;
    min-width: 130px;
    font-family: inherit;
}

/* زر الإجراءات */
.admin-actions-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 15px;
    min-height: 40px;
    background: #641b28;
    color: #fff1df;
    border: 1px solid #641b28;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.admin-actions-trigger::-webkit-details-marker {
    display: none;
}

.admin-actions-trigger:hover {
    background: #48121d;
}

/* القائمة التي تظهر عند الضغط */
.admin-actions-list {
    display: none;
    grid-template-columns: 1fr;
    gap: 7px;
    min-width: 145px;
    margin-top: 8px;
    padding: 9px;
    background: #fffaf4;
    border: 1px solid #e7cdb8;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(53, 27, 29, 0.14);
}

.admin-actions-menu[open] .admin-actions-list {
    display: grid;
}

/* أزرار القائمة */
.admin-actions-list .smallbtn {
    width: 100%;
    min-height: 38px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* تعديل */
.admin-actions-list .action-edit {
    background: #f0e2d6;
    color: #641b28;
}

/* إخفاء وإظهار */
.admin-actions-list .action-toggle {
    background: #e5f1e7;
    color: #287144;
}

/* حذف */
.admin-actions-list .action-delete {
    background: #f8e6e5;
    color: #a12636;
}

/* الجوال */
@media (max-width: 680px) {
    .admin-actions-menu {
        width: 100%;
        min-width: 0;
    }

    .admin-actions-trigger {
        width: 100%;
        justify-content: center;
    }

    .admin-actions-list {
        width: 100%;
    }
}


/* =====================================*/


/* TULIP - Minimal Actions Icon */

.admin-actions-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* زر الخيارات */
.admin-actions-trigger {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    margin: auto !important;

    display: flex !important;
    align-items: center;
    justify-content: center;

    background: #f8eee5 !important;
    color: #641b28 !important;

    border: 1px solid #e7cdb8 !important;
    border-radius: 9px !important;

    box-shadow: none !important;
    cursor: pointer;
    list-style: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

/* حجم الأيقونة */
.admin-actions-trigger svg {
    width: 18px;
    height: 18px;
}

/* عند مرور المؤشر */
.admin-actions-trigger:hover {
    background: #f0dfd3 !important;
    border-color: #cba997 !important;
}

/* عند فتح القائمة */
.admin-actions-menu[open] .admin-actions-trigger {
    background: #641b28 !important;
    color: #fff1df !important;
    border-color: #641b28 !important;
}

/* إزالة سهم المتصفح */
.admin-actions-trigger::-webkit-details-marker {
    display: none;
}


/* =====================================
   TULIP - Centered Status Notification
   ===================================== */

#adminStatus:empty {
    display: none;
}

#adminStatus.is-toast {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);

    width: min(88vw, 420px);
    max-width: 420px;

    margin: 0 !important;
    padding: 22px 24px !important;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 250, 243, 0.98) !important;
    color: #641b28 !important;

    border: 1px solid #e7cdb8;
    border-right: 5px solid #559675;
    border-radius: 17px;

    box-shadow: 0 16px 50px rgba(53, 27, 29, 0.22);

    text-align: center;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.8;

    z-index: 1000;
    pointer-events: none;
    backdrop-filter: blur(10px);

    animation: tulipToastIn 0.3s ease both;
}

/* إشعار الخطأ */
#adminStatus.is-toast.is-error {
    border-right-color: #b8323e;
    background: #fff8f6 !important;
    color: #a12636 !important;
}

/* حركة الظهور */
@keyframes tulipToastIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* تحسين الجوال */
@media (max-width: 600px) {
    #adminStatus.is-toast {
        width: calc(100vw - 40px);
        padding: 19px 17px !important;
        font-size: 15px;
        border-radius: 15px;
    }
}








/* ألوان حالات إشعارات توليب */

#adminStatus.is-toast.is-success {
    border-right: 5px solid #559675;
    color: #287144 !important;
}

#adminStatus.is-toast.is-error {
    border-right: 5px solid #b8323e;
    color: #a12636 !important;
}

#adminStatus.is-toast.is-loading {
    border-right: 5px solid #c49a55;
    color: #805d2e !important;
}

#adminStatus.is-toast:not(.is-success):not(.is-error):not(.is-loading) {
    border-right: 5px solid #641b28;
    color: #641b28 !important;
}









/* إخفاء إشعار المنتصف عند عدم وجود رسالة */
#adminToast[hidden] {
    display: none !important;
}

/* إشعارات العمليات في منتصف الشاشة */
#adminToast.is-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: min(88vw, 420px);
    padding: 22px 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fffaf3;
    color: #641b28;
    border: 1px solid #e7cdb8;
    border-right: 5px solid #641b28;
    border-radius: 17px;

    box-shadow: 0 16px 50px rgba(53, 27, 29, 0.22);

    text-align: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.8;

    z-index: 99999;
    pointer-events: none;
    animation: tulipToastIn 0.3s ease both;
}

#adminToast.is-success {
    border-right-color: #559675;
    color: #287144;
}

#adminToast.is-error {
    border-right-color: #b8323e;
    color: #a12636;
}

#adminToast.is-loading {
    border-right-color: #c49a55;
    color: #805d2e;
}

@media (max-width: 600px) {
    #adminToast.is-toast {
        width: calc(100vw - 40px);
        padding: 19px 17px;
        font-size: 15px;
    }
}








/* =====================================
   TULIP - Separate Product Rows as Cards
   ===================================== */

/* فصل الصفوف عن بعضها */
.admin-products-table {
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    background: transparent !important;
    border: none !important;
}

/* كل منتج كبطاقة مستقلة */
.admin-products-table tbody tr td {
    background: #fffaf4 !important;
    padding: 15px 12px !important;
    border-top: 1px solid #ead7c8 !important;
    border-bottom: 1px solid #ead7c8 !important;
    transition: background 0.2s ease;
}

/* بداية البطاقة */
.admin-products-table tbody tr td:first-child {
    border-inline-start: 1px solid #ead7c8 !important;
    border-start-start-radius: 13px;
    border-end-start-radius: 13px;
}

/* نهاية البطاقة */
.admin-products-table tbody tr td:last-child {
    border-inline-end: 1px solid #ead7c8 !important;
    border-start-end-radius: 13px;
    border-end-end-radius: 13px;
}

/* ظل خفيف لكل بطاقة */
.admin-products-table tbody tr {
    filter: drop-shadow(0 2px 3px rgba(100, 27, 40, 0.06));
}

/* تأثير عند مرور المؤشر */
.admin-products-table tbody tr:hover td {
    background: #fff4e9 !important;
}

/* تحسين الجوال */
@media (max-width: 680px) {
    .admin-products-table {
        border-spacing: 0 8px !important;
    }

    .admin-products-table tbody tr td {
        padding: 13px 9px !important;
    }

    .admin-products-table tbody tr td:first-child {
        border-start-start-radius: 11px;
        border-end-start-radius: 11px;
    }

    .admin-products-table tbody tr td:last-child {
        border-start-end-radius: 11px;
        border-end-end-radius: 11px;
    }
}







/* TULIP - Stronger Product Cards */

.admin-products-table {
    border-spacing: 0 13px !important;
}

/* خلفية كل بطاقة */
.admin-products-table tbody tr td {
    background: #f7e8d9 !important;
    border-top: 1.5px solid #d9b69d !important;
    border-bottom: 1.5px solid #d9b69d !important;
    padding: 17px 13px !important;
}

/* حدود جانبي البطاقة */
.admin-products-table tbody tr td:first-child {
    border-inline-start: 1.5px solid #d9b69d !important;
}

.admin-products-table tbody tr td:last-child {
    border-inline-end: 1.5px solid #d9b69d !important;
}

/* ظل وإبراز البطاقة */
.admin-products-table tbody tr {
    filter: drop-shadow(0 3px 5px rgba(100, 27, 40, 0.12));
}

/* عند مرور المؤشر */
.admin-products-table tbody tr:hover td {
    background: #f1ddca !important;
    border-color: #c99c7e !important;
}

/* تمييز الأسعار */
.admin-products-table tbody td.admin-table-price {
    color: #641b28;
    font-weight: 800;
}

/* الجوال */
@media (max-width: 680px) {
    .admin-products-table {
        border-spacing: 0 10px !important;
    }

    .admin-products-table tbody tr td {
        padding: 15px 9px !important;
    }
}

















/* =========================================
   TULIP ADMIN - Mobile Cards Layout
   ========================================= */

@media (max-width: 680px) {

    /* إلغاء التمرير الأفقي */
    .admin-table-wrapper {
        overflow: visible !important;
        border: 0 !important;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* تحويل الجدول إلى قائمة بطاقات */
    .admin-products-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        border: 0 !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        table-layout: auto !important;
    }

    /* إخفاء عناوين الجدول */
    .admin-products-table thead {
        display: none !important;
    }

    .admin-products-table tbody {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    /* البطاقة المستقلة */
    .admin-products-table tbody tr {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "product product"
            "price status"
            "actions actions";

        width: 100%;
        padding: 10px 13px !important;
        box-sizing: border-box;

        background: #fffaf4 !important;
        border: 1.5px solid #e3c8b3 !important;
        border-radius: 15px !important;

        box-shadow: 0 3px 9px rgba(100, 27, 40, 0.09);
        filter: none !important;
    }

    /* إلغاء تنسيق خلايا الجدول السابق */
    .admin-products-table tbody tr td {
        display: flex !important;
        min-width: 0;
        align-items: center;

        padding: 10px 4px !important;
        background: transparent !important;

        border: 0 !important;
        border-radius: 0 !important;

        text-align: right;
        box-shadow: none !important;
    }

    /* اسم المنتج */
    .admin-products-table tbody tr td:nth-child(1) {
        grid-area: product;
        display: block !important;
        padding-bottom: 12px !important;
        border-bottom: 1px solid #ead9ca !important;
    }

    .admin-table-product {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .admin-table-product strong {
        font-size: 15px;
        font-weight: 800;
        color: #641b28;
    }

    .admin-table-product small {
        font-size: 12px;
        color: #8d6c65;
    }

    /* السعر */
    .admin-products-table tbody tr td:nth-child(2) {
        grid-area: price;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .admin-products-table tbody tr td:nth-child(2)::before {
        content: "السعر";
        color: #987b6e;
        font-size: 11px;
        font-weight: 600;
    }

    .admin-table-price {
        font-size: 15px !important;
        font-weight: 800;
        color: #641b28;
    }

    /* حالة المنتج */
    .admin-products-table tbody tr td:nth-child(3) {
        grid-area: status;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .admin-products-table tbody tr td:nth-child(3)::before {
        content: "الحالة";
        color: #987b6e;
        font-size: 11px;
        font-weight: 600;
    }

    .admin-status-pill {
        font-size: 11px;
        padding: 5px 12px;
    }

    /* الإجراءات */
    .admin-products-table tbody tr td:nth-child(4) {
        grid-area: actions;
        justify-content: space-between;
        padding-top: 10px !important;
        border-top: 1px solid #ead9ca !important;
    }

    .admin-products-table tbody tr td:nth-child(4)::before {
        content: "خيارات المنتج";
        color: #987b6e;
        font-size: 12px;
        font-weight: 600;
    }

    .admin-table-actions {
        display: flex !important;
        justify-content: flex-end;
        min-width: 0 !important;
    }

    /* أيقونة الخيارات */
    .admin-actions-trigger {
        width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
    }

    /* القائمة المنسدلة فوق محتوى البطاقة */
    .admin-actions-menu {
        position: relative;
    }

    .admin-actions-list {
        position: absolute;
        top: calc(100% + 5px);
        inset-inline-end: 0;
        z-index: 50;
        min-width: 140px;
    }

    /* عدم تطبيق تأثيرات الصفوف القديمة */
    .admin-products-table tbody tr:hover td {
        background: transparent !important;
    }
}





















/* TULIP - Clearer Mobile Product Cards */

@media (max-width: 680px) {

    /* خلفية البطاقة */
    .admin-products-table tbody tr {
        background: #f1dfce !important;
        border: 2px solid #d5ad91 !important;
        border-radius: 16px !important;

        box-shadow:
            0 4px 10px rgba(100, 27, 40, 0.10),
            inset 0 0 0 1px rgba(255, 255, 255, 0.45);

        padding: 11px 13px !important;
    }

    /* الحفاظ على خلفية البطاقة داخل جميع الخانات */
    .admin-products-table tbody tr td {
        background: transparent !important;
    }

    /* حدود أوضح بين أجزاء البطاقة */
    .admin-products-table tbody tr td:nth-child(1),
    .admin-products-table tbody tr td:nth-child(4) {
        border-color: #d9b9a1 !important;
    }

    /* عند الضغط على البطاقة */
    .admin-products-table tbody tr:active {
        background: #ead3be !important;
    }

}











.admin-actions-trigger {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #f8eee5 !important;
    color: #641b28 !important;
    border: 1px solid #dfc5b1 !important;
    border-radius: 9px !important;
    cursor: pointer;
    box-shadow: none !important;
}




























/* نعومة ظهور قائمة الإجراءات */
.admin-actions-list {
    transform-origin: top right;
    animation: actionsFadeIn 0.22s ease-out;
}

@keyframes actionsFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* منع قائمة الإجراءات من تغيير حجم الصف */
.admin-actions-menu {
    position: relative;
}

.admin-actions-list {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    margin-top: 8px;
}


/* إظهار قائمة الإجراءات فوق بقية المنتجات */
.admin-actions-menu[open] {
    position: relative;
    z-index: 9999;
}

.admin-actions-menu[open] .admin-actions-list {
    z-index: 10000;
}


/* تمييز المنتج الذي فُتحت خياراته */
.admin-actions-menu[open] {
    z-index: 9999;
}

.admin-actions-menu[open] .admin-actions-trigger {
    background: #641b28 !important;
    color: #fff1df !important;
}

.admin-actions-menu[open] .admin-actions-list {
    border: 1px solid #641b28;
    box-shadow: 0 8px 24px rgba(100, 27, 40, 0.2);
}

/* =====================================
   TULIP - Product Action Icons & Preview
   ===================================== */
.admin-icon-actions {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
}
.admin-icon-actions .smallbtn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease;
}
.admin-icon-actions .smallbtn:hover { transform: translateY(-2px); }
.admin-icon-actions svg {
    width: 17px; height: 17px;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.admin-icon-actions .action-preview { background: #eee5f4; color: #68417c; border-color: #dfcde9; }
.admin-icon-actions .action-edit { background: #f0e2d6; color: #641b28; border-color: #e4cdbb; }
.admin-icon-actions .action-toggle { background: #f7eddf; color: #9a682d; border-color: #ead7bd; }
.admin-icon-actions .action-delete { background: #f8e6e5; color: #a12636; border-color: #efcecc; }
.admin-icon-actions .smallbtn:focus-visible { outline: 2px solid #641b28; outline-offset: 2px; }

/* Detailed customer-style product preview */
.product-preview-backdrop[hidden] { display: none !important; }
.product-preview-backdrop {
    position: fixed; inset: 0; z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    padding: 18px; background: rgba(35, 17, 19, .68);
    backdrop-filter: blur(4px);
}
.product-preview-modal {
    position: relative; width: min(520px, 100%); max-height: 92vh;
    overflow-y: auto; background: #fffaf3; border: 1px solid #e7cdb8;
    border-radius: 20px; box-shadow: 0 20px 60px rgba(35, 10, 15, .28);
}
.product-preview-close {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    width: 36px; height: 36px; border: 1px solid #e7cdb8;
    border-radius: 50%; background: #fffaf3; color: #641b28;
    font-size: 25px; line-height: 1; cursor: pointer;
}
.product-preview-card { background: #fffaf3; border-radius: 20px; overflow: hidden; }
.product-preview-photo { height: 245px; position: relative; overflow: hidden; background: linear-gradient(135deg,#e9d1b8,#fff0df); }
.product-preview-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.product-preview-photo.image-unavailable { display: grid; place-items: center; }
.product-preview-ribbon { position: absolute; bottom: 12px; left: 14px; color: #8b4a45; font: 11px Georgia,serif; letter-spacing: 2px; }
.product-preview-body { padding: 20px; }
.product-preview-category { display: inline-block; padding: 5px 11px; border-radius: 30px; background: #f2e5d9; color: #8b5c50; font-size: 12px; }
.product-preview-body h2 { margin: 12px 0 2px; color: #641b28; font-size: 25px; }
.product-preview-en { margin: 0; color: #8d6c65; font-size: 14px; }
.product-preview-price { margin: 16px 0; padding: 13px 0; border-top: 1px solid #eadbd0; border-bottom: 1px solid #eadbd0; color: #641b28; font-size: 20px; font-weight: 800; }
.product-preview-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product-preview-extra > div { display: grid; gap: 4px; padding: 10px; border-radius: 10px; background: #f8eee5; min-width: 0; }
.product-preview-extra span { color: #8d6c65; font-size: 11px; }
.product-preview-extra strong { color: #351b1d; font-size: 13px; overflow-wrap: anywhere; }
.product-preview-extra strong.is-active { color: #287144; }
.product-preview-extra strong.is-hidden { color: #a12636; }
.product-preview-note { margin: 14px 0 0; color: #987c70; font-size: 11px; line-height: 1.7; }
@media (max-width: 680px) {
    .admin-icon-actions { gap: 5px; }
    .admin-icon-actions .smallbtn { width: 32px; min-width: 32px; height: 32px; min-height: 32px; }
    .admin-icon-actions svg { width: 15px; height: 15px; }
    .product-preview-photo { height: 205px; }
    .product-preview-body { padding: 16px; }
}


/* =====================================
   TULIP - Refined Hero & Soft Buttons
===================================== */

/* العنوان الرئيسي */
.intro {
    padding: 34px 0 14px;
}

.intro .eyebrow {
    color: #e7c7a5;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.intro h2 {
    font-size: clamp(32px, 5.2vw, 48px);
    line-height: 1.25;
    margin: 8px 0 12px;
    font-weight: 800;
}

.intro p {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 12px;
    color: #f1dccc;
    font-size: clamp(14px, 2vw, 18px);
    line-height: 1.9;
}

/* مربع البحث */
.search {
    width: min(100%, 680px);
    max-width: 680px;
    min-height: 58px;
    padding: 15px 23px;
    border: 1px solid #e5c8b3;
    border-radius: 25px;
    background: #fffaf4;
    box-shadow: 0 3px 10px rgba(100, 27, 40, 0.055);
    text-align: right;
    transition: 0.2s ease;
}

.search:focus {
    outline: none;
    border-color: #b77c83;
    background: #fffdf9;
    box-shadow: 0 0 0 4px rgba(100, 27, 40, 0.08);
}

/* أزرار التصنيفات */
.cats {
    align-items: center;
    gap: 12px;
    padding: 17px 0 23px;
}

.cat {
    min-height: 46px;
    padding: 11px 22px;
    border: 1px solid #e5c8b3;
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        #fffaf4 0%,
        #fff5eb 100%
    );
    color: #641b28;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(100, 27, 40, 0.055);
    transition: all 0.22s ease;
}

.cat:hover {
    background: #fffdf9;
    border-color: #d7b49d;
    box-shadow: 0 4px 12px rgba(100, 27, 40, 0.09);
    transform: translateY(-1px);
}

/* التصنيف المحدد */
.cat.active {
    background: linear-gradient(
        135deg,
        #762638 0%,
        #641b28 100%
    );
    color: #fff7ee;
    border-color: #641b28;
    box-shadow: 0 4px 12px rgba(100, 27, 40, 0.18);
}

/* زر اللغة */
.pill {
    border: 1px solid rgba(231, 199, 165, 0.65);
    background: rgba(255, 250, 243, 0.10);
    border-radius: 999px;
    padding: 10px 19px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pill:hover {
    background: rgba(255, 250, 243, 0.18);
    border-color: #e7c7a5;
    transform: translateY(-1px);
}

/* الجوال */
@media (max-width: 680px) {
    .intro {
        padding: 24px 0 12px;
    }

    .intro h2 {
        font-size: clamp(29px, 8vw, 38px);
    }

    .intro p {
        font-size: 14px;
        line-height: 1.8;
    }

    .search {
        width: 100%;
        max-width: none;
        min-height: 54px;
        padding: 13px 18px;
        border-radius: 21px;
    }

    .cats {
        gap: 9px;
        padding: 14px 0 20px;
    }

    .cat {
        min-height: 43px;
        padding: 10px 17px;
        font-size: 13px;
    }
}

/* Coffee Cup Above Hero Title */
.hero-cup {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 13px;
    color: #fff1df;
}

.hero-cup svg {
    width: 48px;
    height: 48px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 5px #0002);
}

@media (max-width: 680px) {
    .hero-cup {
        margin-bottom: 10px;
    }

    .hero-cup svg {
        width: 42px;
        height: 42px;
    }
}


/* =====================================
   TULIP - Admin Button & Modal Fix
===================================== */

/* زر الإدارة أعلى يسار الشاشة */
.admin-fab {
    position: fixed !important;
    top: 18px !important;
    left: 18px !important;
    right: auto !important;
    bottom: auto !important;
    inset: auto !important;

    width: 46px !important;
    height: 46px !important;
    padding: 0 !important;

    display: grid !important;
    place-items: center !important;

    background: #fff1df !important;
    color: #641b28 !important;
    border: 1px solid #e7c7a5 !important;
    border-radius: 50% !important;

    box-shadow: 0 4px 14px rgba(0,0,0,.15) !important;

    z-index: 10001 !important;
    cursor: pointer;
}

.admin-fab svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-fab:hover {
    background: #641b28 !important;
    color: #fff1df !important;
}

/* لوحة الإدارة كنافذة منبثقة */
#admin {
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    height: 100vh !important;

    background: rgba(36, 21, 18, 0.65) !important;

    display: none;
    align-items: center !important;
    justify-content: center !important;

    padding: 16px !important;
    z-index: 9999 !important;
}

#admin.open {
    display: flex !important;
}

/* حجم لوحة الإدارة */
#admin .admin-panel {
    position: relative;
    width: min(780px, 100%) !important;
    max-height: calc(100vh - 32px) !important;
    margin: auto !important;
    overflow-y: auto !important;
    border-radius: 20px !important;
}

/* الجوال */
@media (max-width: 680px) {
    .admin-fab {
        top: 12px !important;
        left: 12px !important;
        width: 42px !important;
        height: 42px !important;
    }

    #admin {
        padding: 10px !important;
    }

    #admin .admin-panel {
        max-height: calc(100vh - 20px) !important;
    }
}


/* =====================================================
   TULIP FINAL FIX — ADMIN BUTTON + ADMIN MODAL
   Fixes older conflicting rules above without changing
   the rest of the menu design.
===================================================== */

/* Floating admin icon: fixed at the upper-left corner. */
#adminOpen.admin-fab {
    position: fixed !important;
    top: 16px !important;
    left: 16px !important;
    right: auto !important;
    bottom: auto !important;

    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;

    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    gap: 0 !important;

    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    white-space: nowrap !important;

    background: #fff1df !important;
    color: #641b28 !important;
    border: 1px solid #e7c7a5 !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;

    cursor: pointer !important;
    z-index: 10002 !important;
    transform: none;
}

#adminOpen.admin-fab > svg {
    display: block !important;
    width: 21px !important;
    min-width: 21px !important;
    max-width: 21px !important;
    height: 21px !important;
    min-height: 21px !important;
    max-height: 21px !important;
    overflow: visible !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

#adminOpen.admin-fab:hover {
    background: #641b28 !important;
    color: #fff1df !important;
}

#adminOpen.admin-fab:focus-visible {
    outline: 3px solid #e7c7a5 !important;
    outline-offset: 3px !important;
}

/* Full-screen backdrop. The modal is a direct child of body. */
#admin {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 16px !important;

    display: none !important;
    align-items: center !important;
    justify-content: center !important;

    background: rgba(36, 21, 18, 0.68) !important;
    z-index: 10000 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

#admin.open {
    display: flex !important;
}

#admin[hidden] {
    display: none !important;
}

/* IMPORTANT: restore the missing cream panel surface. */
#admin > .panel.admin-panel,
#admin .admin-panel {
    position: relative !important;
    display: block !important;
    flex: 0 1 780px !important;

    width: min(780px, 100%) !important;
    max-width: 780px !important;
    max-height: calc(100vh - 32px) !important;
    max-height: calc(100dvh - 32px) !important;

    margin: 0 auto !important;
    padding: 22px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;

    background: #fffaf4 !important;
    color: #351b1d !important;
    border: 1px solid #e7cdb8 !important;
    border-radius: 20px !important;
    box-shadow: 0 22px 70px rgba(22, 10, 12, 0.35) !important;
}

/* Keep the admin form and login workspace readable on the panel. */
#admin .admin-form {
    background: #fff !important;
    color: #351b1d !important;
}

#admin .admin-status {
    background: #f7eee6 !important;
    color: #6b675f !important;
}

@media (max-width: 680px) {
    #adminOpen.admin-fab {
        top: 12px !important;
        left: 12px !important;
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
    }

    #adminOpen.admin-fab > svg {
        width: 19px !important;
        min-width: 19px !important;
        max-width: 19px !important;
        height: 19px !important;
        min-height: 19px !important;
        max-height: 19px !important;
    }

    #admin {
        padding: 10px !important;
    }

    #admin > .panel.admin-panel,
    #admin .admin-panel {
        max-height: calc(100vh - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
        padding: 15px !important;
        border-radius: 16px !important;
    }
}


/* إشعارات توليب - خلفية زرقاء شفافة */
#adminToast.is-toast {
    background: rgba(35, 105, 165, 0.82) !important;
    color: #ffffff !important;
    border: 1px solid rgba(190, 225, 255, 0.45) !important;
    border-right: 5px solid #a9d8ff !important;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow: 0 12px 35px rgba(20, 65, 110, 0.2);
}

/* لون نص إشعار فشل تسجيل الدخول */
#adminToast.is-toast.is-error {
    color: #b42332 !important;
    border-right-color: #b42332 !important;
}

/* =====================================
   TULIP - Featured / New Arrivals Section
===================================== */
.featured-section[hidden] { display: none !important; }
.featured-section {
    margin: 0 0 30px;
    padding: 24px;
    background: #fffaf3;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 7px 22px #5a1a2510;
}
.featured-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.featured-kicker {
    color: var(--muted);
    font: 10px Georgia, serif;
    letter-spacing: 3px;
}
.featured-heading h2 {
    margin: 7px 0 3px;
    color: var(--wine);
    font-size: 25px;
    font-weight: 800;
}
.featured-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.featured-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f3e4d9;
    color: var(--wine);
    font: 700 10px Georgia, serif;
    letter-spacing: 1.5px;
}
.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.featured-card .photo { height: 180px; }
.featured-card { min-width: 0; }

/* Featured settings inside the admin workspace */
#adminFeaturedSection[hidden] { display: none !important; }
.featured-admin-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
    align-items: end;
    gap: 14px;
    margin: 16px 0 20px;
    padding: 16px;
    background: #fffaf4;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.featured-enable-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--wine);
    font-weight: 700;
    cursor: pointer;
}
.featured-enable-control input {
    width: 19px;
    height: 19px;
    accent-color: var(--wine);
}
.featured-limit-control { margin: 0; }
.featured-limit-control input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 12px;
    background: #fffdf9;
    color: var(--ink);
    font: inherit;
}
.featured-picker-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 10px;
    color: var(--wine);
}
.featured-picker-heading span {
    color: var(--muted);
    font-size: 12px;
}
.featured-product-search {
    width: 100%;
    min-height: 42px;
    margin-bottom: 12px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fffaf4;
    color: var(--ink);
    font: inherit;
}
.featured-product-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    max-height: 390px;
    overflow-y: auto;
    padding: 2px 2px 12px;
    margin-bottom: 12px;
}
.featured-product-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffaf4;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}
.featured-product-option:has(input:checked) {
    border-color: var(--wine);
    background: #f7e9df;
    box-shadow: inset 0 0 0 1px var(--wine);
}
.featured-product-option input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    accent-color: var(--wine);
}
.featured-product-option img,
.featured-product-placeholder {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 9px;
    object-fit: cover;
    background: #f1dfcb;
}
.featured-product-placeholder {
    display: grid;
    place-items: center;
    color: var(--wine);
    font-size: 22px;
}
.featured-product-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.featured-product-copy strong {
    color: var(--ink);
    font-size: 13px;
    overflow-wrap: anywhere;
}
.featured-product-copy small {
    color: var(--muted);
    font-size: 10px;
    text-align: right;
}
.featured-product-copy em {
    color: #987b6e;
    font-size: 10px;
    font-style: normal;
}
.featured-product-option.is-inactive { opacity: .72; }
#saveFeaturedSettingsBtn { min-height: 42px; padding-inline: 18px; }

@media (max-width: 950px) {
    .featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .featured-section { padding: 17px 13px; margin-bottom: 24px; }
    .featured-heading h2 { font-size: 22px; }
    .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .featured-card .photo { height: 145px; }
    .featured-admin-settings { grid-template-columns: 1fr; gap: 8px; padding: 13px; }
    .featured-picker-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .featured-product-picker { grid-template-columns: 1fr; max-height: 340px; }
}

/* =====================================
   TULIP - Simple Admin Account Settings
===================================== */
#adminAccountSection[hidden] {
    display: none !important;
}

.account-info-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 14px 0 18px;
    padding: 16px;
    background: #fffaf4;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.account-info-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f2e3d7;
    color: var(--wine);
    font-size: 21px;
}

.account-info-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.account-info-copy strong {
    color: var(--wine);
    font-size: 15px;
}

.account-info-copy span {
    color: var(--ink);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.account-info-copy small,
.account-form-note {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.account-settings-form {
    margin-top: 16px !important;
}

.account-settings-form h4 {
    margin-bottom: 6px !important;
}

.account-settings-form .account-form-note {
    margin: 0 0 12px;
}

.account-settings-form .admin-form-actions {
    padding-top: 12px;
}

.account-refresh-btn {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    background: #f8eee5;
    color: var(--wine);
    border-radius: 9px;
    padding: 8px 13px;
    font-weight: 700;
}

#showAccountTab {
    white-space: nowrap;
}

@media (max-width: 680px) {
    .account-info-card {
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
        flex-wrap: wrap;
    }

    .account-info-copy {
        min-width: calc(100% - 65px);
    }

    .account-refresh-btn {
        margin-inline-start: 54px;
    }
}

@media (max-width: 680px) {
    .admin-tabs {
        flex-wrap: wrap;
    }
    .admin-tabs .admin-tab {
        flex: 1 1 calc(50% - 8px);
        min-width: 125px;
    }
}

/* =====================================
   TULIP - Manager-only account controls
===================================== */
#showManageAccountsTab[hidden] { display: none !important; }
#adminManageAccountsSection[hidden] { display: none !important; }
#accountProfileForm .admin-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.admin-permission-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin: 14px 0;
    padding: 14px;
    background: #f8eee5;
    border: 1px solid #e7cdb8;
    border-radius: 12px;
}
.admin-permission-picker > strong { flex: 0 0 100%; color: #641b28; }
.admin-permission-picker label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #351b1d;
    font-size: 13px;
    cursor: pointer;
}
.admin-permission-picker input { accent-color: #641b28; width: 16px; height: 16px; }
.admin-users-list { display: grid; gap: 12px; margin-top: 14px; }
.admin-user-card {
    padding: 16px;
    border: 1px solid #e7cdb8;
    border-radius: 14px;
    background: #fffaf4;
    box-shadow: 0 3px 12px rgba(100,27,40,.05);
}
.admin-user-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.admin-user-identity { display: grid; gap: 4px; min-width: 0; }
.admin-user-identity strong { color: #641b28; font-size: 15px; }
.admin-user-identity span { color: #8d6c65; font-size: 12px; overflow-wrap: anywhere; }
.admin-user-role {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
}
.admin-user-role.is-manager { color: #68417c; background: #eee5f4; }
.admin-user-role.is-staff { color: #287144; background: #e3f1e6; }
.admin-user-edit-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-user-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.admin-user-card-actions .smallbtn { min-height: 38px; }
#adminUsersList .admin-list-heading { display: flex; justify-content: space-between; align-items: center; }
@media (max-width: 680px) {
    #accountProfileForm .admin-fields,
    .admin-user-edit-fields { grid-template-columns: 1fr; }
    .admin-permission-picker { align-items: flex-start; flex-direction: column; }
    .admin-permission-picker > strong { flex-basis: auto; }
    .admin-user-card { padding: 12px; }
}
.admin-tabs .admin-tab[hidden] {
    display: none !important;
}


/* Hide the add-product toggle when the signed-in employee lacks add_products. */
#toggleProductFormBtn[hidden] {
    display: none !important;
}

/* Keep granular permission controls compact and aligned. */
.admin-permission-picker label {
    line-height: 1.6;
}
.admin-permission-picker input[type="checkbox"] {
    flex: 0 0 16px;
}

/* =====================================
   TULIP FOOTER CONTACT DESIGN
===================================== */

.footer {
    padding: 28px 0;
}

.footrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-brand {
    text-align: right;
    flex-shrink: 0;
}

.footer-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    flex: 1;
    flex-wrap: wrap;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    color: #fff1df;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;

    transition: 0.2s ease;
}

.footer-contact-item svg {
    width: 25px;
    height: 25px;

    fill: none;
    stroke: #e7c7a5;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;

    flex-shrink: 0;
}

.footer-contact-item:hover {
    color: #e7c7a5;
    transform: translateY(-2px);
}

.footer-contact-item:hover svg {
    stroke: #ffffff;
}

.footer-email-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-email-text small {
    color: #e7c7a5;
    font-size: 11px;
    font-weight: 400;
}

.footer-email-text strong {
    font-size: 13px;
    color: #fff1df;
    letter-spacing: 0.2px;
}

/* Mobile */
@media (max-width: 680px) {
    .footrow {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 22px;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-contact {
        width: 100%;
        flex-direction: column;
        gap: 18px;
    }

    .footer-contact-item {
        justify-content: center;
    }

    .footer-email-text {
        text-align: right;
    }
}

/* Coffee Cup Hero Icon */
.hero-cup {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    color: #fff1df;
}

.hero-cup svg {
    width: 54px;
    height: 54px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.15));
}

@media (max-width: 680px) {
    .hero-cup {
        margin-bottom: 14px;
    }

    .hero-cup svg {
        width: 46px;
        height: 46px;
    }
}

/* Account Role Badge */
.account-role-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 5px 0;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.account-role-badge.is-manager {
    background: #f5ead2;
    color: #8b672f;
    border: 1px solid #e8d5ad;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: none;
}

.account-role-badge.is-staff {
    background: #e9f3e9;
    color: #267342;
    border: 1px solid #c8dfca;
}