/* =========================================================
   GLOBAL BASE
========================================================= */
* { box-sizing: border-box; }

html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
       height: 100%;
}

html, body {
    overflow-x: hidden;
}


body {
    font-family: Arial, sans-serif;
    color: #222;
    display: flex;
    flex-direction: column;

    /* Background: choose ONE mode.
       For your striped/pattern image, tiling is best and prevents stretching. */
    background-image: url('/public/assets/images/bg.jpeg');
    background-repeat: repeat;       /* pattern-friendly */
    background-size: 900px auto;     /* adjust size as desired: 600px / 900px / 1200px */
    background-position: top left;

    /* Avoid fixed on mobile; it causes jank on many devices */
    background-attachment: fixed;
}

body {
    overflow-x: hidden;
}


.home-wrapper {
    flex: 1;
    display: block;   /* REQUIRED for sticky */
}


/* Optional: keep container centered */
.home-wrapper .container {
    width: 100%;
}


.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;

    background: #ffffff;
    border-bottom: 3px dashed #c28a8a;
}


.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.logo-link:hover {
    opacity: 0.9;
}
/* ===============================
   HEADER — MOBILE FIX
=============================== */
@media (max-width: 768px) {

    .logo-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
    }

    .logo-link {
        display: flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        color: inherit;

        /* IMPORTANT: bigger tap area */
        padding: 6px 4px;
    }

    .site-logo {
        width: 42px;
        height: auto;
    }

    .logo-text {
        font-size: 1.1rem;
        line-height: 1.2;
        white-space: nowrap;
    }

    .cart-icon {
        font-size: 1.5rem;
        padding: 6px;
        position: relative;
    }

    .cart-count {
        top: -4px;
        right: -4px;
    }
}


@media (max-width: 600px) {
    .site-header {
        margin-bottom: 6px;
    }

    .header-inner {
        padding: 8px 0;
    }
}

/* ==============================
   COOKIE CONSENT (FINAL)
============================== */
.cookie-consent {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 360px;

    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    padding: 14px;

    text-align: center;
    font-size: 0.85rem;
    z-index: 9999;
}

.cookie-consent img {
    width: 44px;
    margin-bottom: 6px;
}

.cookie-consent p {
    margin: 6px 0;
}

.cookie-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.cookie-consent button {
    border-radius: 999px;
    padding: 6px 14px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
}

.cookie-consent .accept {
    background: #ff6f91;
    color: #fff;
}

.cookie-consent .configure {
    background: transparent;
    border: 2px solid #ff6f91;
    color: #ff6f91;
}

.cookie-consent a {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #2a7ae2;
    text-decoration: none;
}

.cookie-consent.hidden {
    display: none;
}

.btn-primary {
  background: #e91e63;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-outline {
  background: #fff;
  color: #e91e63;
  border: 2px solid #e91e63;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-primary.small {
  margin-top: 10px;
  font-size: 0.85rem;
  padding: 8px 14px;
}

/* ===== LINKS ===== */
.cookie-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #1e88e5;
  text-decoration: none;
}

/* ===== SETTINGS ===== */
#cookie-settings {
  margin-top: 14px;
  text-align: left;
  font-size: 0.85rem;
}

#cookie-settings label {
  display: block;
  margin-bottom: 6px;
}

/* ===== MOBILE ===== */
@media (max-width: 420px) {
  .cookie-card {
    padding: 18px;
  }
}

/* =========================================================
   BACK TO HOMEPAGE BUTTON
========================================================= */
.back-home-btn {
    position: fixed;
    top: 18px;
    right: 20px;
    background: #2a7ae2;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 9999;
}
.back-home-btn:hover { background: #1e5fb8; }

/* =========================================================
   LAYOUT WRAPPERS
========================================================= */
.container {
    width: 95%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 11px 0 10px;
}

.home-wrapper { padding-bottom: 40px; }

.checkout-panel {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    margin: 40px auto;
    max-width: 960px;           /* controls card width */
}

.checkout-content {
    max-width: 620px;           /* readable column */
    margin: 0 auto;             /* centers content */
}

/* Headings */
.checkout-panel h2,
.checkout-panel h3 {
    text-align: center;
}

/* Table */
.checkout-table {
    width: 100%;
    margin-top: 20px;
}

/* Breakdown alignment */
.checkout-breakdown {
    margin-top: 20px;
    font-size: 1rem;
}

.checkout-breakdown p {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
}

.checkout-breakdown hr {
    margin: 14px 0;
}

/* Grand total emphasis */
.checkout-total {
    font-size: 1.3rem;
    font-weight: bold;
}

/* Buttons */
.checkout-actions {
    margin-top: 30px;
    text-align: center;
}

/* INNER CONTENT CONSTRAINT */
.checkout-content {
    max-width: 640px;
    margin: 0 auto;
}

/* CENTER HEADINGS */
.checkout-panel h2,
.checkout-panel h3 {
    text-align: center;
}

/* TABLE ALIGNMENT */
.checkout-table {
    width: 100%;
    margin: 20px auto;
}

.checkout-table th {
    text-align: left;
}

.checkout-table th:nth-child(2),
.checkout-table td:nth-child(2) {
    text-align: center;
    width: 80px;
}

.checkout-table th:nth-child(3),
.checkout-table td:nth-child(3) {
    text-align: right;
    width: 120px;
}

/* BREAKDOWN GRID */
.checkout-breakdown {
    max-width: 420px;
    margin: 20px auto 0 auto;
    font-size: 1rem;
}

.checkout-breakdown p {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
}

.checkout-breakdown hr {
    margin: 14px 0;
}

/* GRAND TOTAL */
.checkout-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: bold;
}

/* ACTIONS */
.checkout-actions {
    text-align: center;
    margin-top: 30px;
}


/* =========================================================
   HEADER
========================================================= */
.site-header {
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
    margin-bottom: 10px;
    border-bottom: 3px dashed #c28a8a;
}

.header-inner {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.logo {
    font-size: 1.4rem;
    margin: 0;
}

/* =========================================================
   HERO
========================================================= */
.home-hero {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 12px;
    border: 2px dashed cadetblue;
    box-shadow: 0 4px 15px rgb(0 0 0 / 70%);
    background: linear-gradient(
        180deg,
        rgba(255,245,245,0.85),
        rgba(255,245,245,0.70)
    );
}

.home-hero h1 {
    font-size: 2rem;
    margin-bottom: 6px;
}

.home-hero p {
    margin: 0;
    font-size: 0.98rem;
    color: black;
}

/* =========================================================
   SECTION HEADERS (VIDEO / PRODUCTS / REQUEST)
========================================================= */
.video-section h2,
.product-section h2,
.request-box h2 {
    background: #f3cfcf;
    padding: 12px 26px;
    display: inline-block;
    font-weight: 700;
    font-size: 1.25rem;
    color: #4b3b3b;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
    border: 2px dashed #c28a8a;
}

.video-section h2::before,
.product-section h2::before,
.request-box h2::before,
.video-section h2::after,
.product-section h2::after,
.request-box h2::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f3cfcf;
    border-radius: 50%;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.3);
}

.video-section h2::before,
.product-section h2::before,
.request-box h2::before {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
}

.video-section h2::after,
.product-section h2::after,
.request-box h2::after {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer {
    background: #ffffff;
    border-top: 3px dashed #c28a8a;
    padding: 15px 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top:auto;
}

/* Optional discreet admin link */
.admin-link {
    margin-left: 12px;
    color: #aaa;
    text-decoration: none;
    font-size: 0.8rem;
}
.admin-link:hover {
    color: #2a7ae2;
    text-decoration: underline;
}

/* =========================================================
   VIDEO SECTION
========================================================= */
.video-section {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgb(0 0 0 / 70%);
    border: 2px dashed cadetblue;
    background: linear-gradient(
        180deg,
        rgba(255,245,245,0.85),
        rgba(255,245,245,0.70)
    );
}

.video-section h2 {
    margin-bottom: 10px;
    background: #ffb4b4;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgb(0 0 0 / 70%);
}

.video-wrapper {
    max-width: 650px;
    margin: 0 auto 35px;
    padding: 12px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.80);
}

.video-wrapper video {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: cover;
    border-radius: 8px;
}

/* Featured story block */
.featured-paragraph {
    margin-top: 40px;
    padding: 20px;
    background: #fafafa;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-image-wrapper { text-align: center; }

.feature-image {
    max-width: 320px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

.feature-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

/* -----------------------------
   PRODUCT ACTION BUTTONS
   (Index Page – Soft Palette)
----------------------------- */
.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}



/* =========================================================
   PRODUCT SECTION
========================================================= */

.product-section {
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgb(0 0 0 / 70%);
    border: 2px dashed cadetblue;
    background: linear-gradient(
        180deg,
        rgba(255,245,245,0.85),
        rgba(255,245,245,0.70)
    );
}

.product-section h2 {
    margin-bottom: 15px;
    background: #ffb4b4;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgb(0 0 0 / 70%);
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.polaroid .price {
    background: #d6eaf5;
    border-radius: 8px;
    padding: 5px;
}

/* Polaroid style */
.polaroid {
    width: 230px;
    background: #fff;
    padding: 14px 14px 25px;
    border-radius: 6px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.80);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #b9bfc1;
}

.product-grid .polaroid:nth-child(odd) { transform: rotate(-2deg); }
.product-grid .polaroid:nth-child(even) { transform: rotate(2deg); }

.polaroid:hover {
    transform: rotate(0deg) scale(1.04);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.polaroid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    margin-bottom: 12px;
}

.polaroid .caption {
    font-size: 0.9rem;
    color: #333;
    background: #f9eeee;
    padding: 8px;
    border-radius: 8px;
}

.polaroid .price { font-weight: bold; margin-top: 4px; font-size: 1.1rem; }
.polaroid .sizes,
.polaroid .colors,
.polaroid .quantity { font-size: 0.85rem; margin-top: 2px;  background: #e1e1e1;
    border-radius: 8px;
    padding: 5px; }

.polaroid .stock { margin-top: 6px; font-weight: bold; font-size: 0.9rem; background: #f7fbdf;
    border-radius: 8px;
    padding: 5px;}
.polaroid .stock-in { color: green; }
.polaroid .stock-out { color: red; }

.polaroid .description {
    margin-top: 8px;
    font-size: 0.9rem;
    line-height: 1.35em;
    background: cornsilk;
    padding: 5px;
    border-radius: 8px;
}

/* -----------------------------
   PRODUCT ACTION BUTTONS
----------------------------- */
.product-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.product-actions form {
    flex: 1;
}


/* Add to Cart – soft charcoal */
.btn-cart {
    background: #5a5a57;          /* warm charcoal */
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn-cart:hover {
    background: #4d4d4a;
    transform: translateY(-1px);
}

/* Buy Now – muted artisan blue */
.btn-buy {
    background: #5f8fbf;          /* soft craft blue */
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn-buy:hover {
    background: #4f7ea8;
    transform: translateY(-1px);
}

/* Disabled (out of stock) */
.btn-cart:disabled,
.btn-buy:disabled {
    background: #cfcfcf;
    color: #777;
    cursor: not-allowed;
    transform: none;
}

.btn-home {
    background: #777;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
}

/* -----------------------------
   CART ICON
----------------------------- */
.cart-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-left: 20px;
}

.cart-link {
    font-size: 1.6rem;
    text-decoration: none;
    color: #333;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #c0392b;
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
}

.custom-upload {
    margin: 25px 0;
}
#upload-status {
    margin-top: 8px;
    font-size: 0.95rem;
}

/* =========================================================
   REQUEST BOX
========================================================= */
.request-box {
    margin-top: 40px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgb(0 0 0 / 70%);
    border: 2px dashed cadetblue;
    background: linear-gradient(
        180deg,
        rgba(255,245,245,0.85),
        rgba(255,245,245,0.70)
    );
}

.request-card {
    margin: 0 auto;
    background: #fff;
    padding: 20px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.80);
}

.request-box h2 {
    margin-bottom: 10px;
    background: #ffb4b4;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgb(0 0 0 / 70%);
}

.request-form input[type="email"],
.request-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
}

.request-form textarea {
    min-height: 120px;
    resize: vertical;
}

.request-form button {
    padding: 12px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    width: 100%;
    font-size: 1rem;
    cursor: pointer;
}
.request-form button:hover { opacity: 0.9; }

/* =========================================================
   LOGIN BOX (ADMIN)
========================================================= */
.login-wrapper {
    max-width: 400px;
    margin: 60px auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.login-wrapper h3 {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}

.login-wrapper input[type="text"],
.login-wrapper input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.login-wrapper button {
    width: 100%;
    padding: 10px;
    background: #333;
    color: #fff;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

/* =========================================================
   ADMIN FORMS (UPLOAD PRODUCT / UPLOAD VIDEO)
========================================================= */
.admin-form-container {
    max-width: 600px;
    margin: 40px auto;
    background: rgba(255,255,255,0.92);
    padding: 25px 35px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.50);
    border: 2px dashed cadetblue;
}

.admin-form-container h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
    letter-spacing: 0.5px;
}

.admin-form-container label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.admin-form-container input[type="text"],
.admin-form-container input[type="number"],
.admin-form-container input[type="file"],
.admin-form-container textarea {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.admin-form-container input:focus,
.admin-form-container textarea:focus {
    border-color: #4da3ff;
    box-shadow: 0 0 5px rgba(77,163,255,0.4);
    outline: none;
}

.admin-form-container .checkbox-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.admin-form-container .checkbox-row input { margin-right: 8px; }

.admin-form-container button {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    background: #4da3ff;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}
.admin-form-container button:hover { background: #1e8aff; }

.admin-form-container .message {
    background: #eaf9ea;
    border-left: 5px solid #39b24a;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    color: #2b7a34;
    font-size: 0.95rem;
}

/* =========================================================
   ADMIN TABLES (PRODUCTS / VIDEOS)
========================================================= */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;

    /* Desktop tables can use fixed layout */
    table-layout: fixed;
    background: rgba(255,255,255,0.92);
    border-radius: 10px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 14px 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
    font-size: 0.95rem;
}

.admin-table th {
    background: #f5f5f5;
    font-weight: bold;
}

/* Column widths (DESKTOP only) */
.admin-table th:nth-child(1),
.admin-table td:nth-child(1) { width: auto; }

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) { width: auto; }

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) { width: auto; }

.admin-table th:nth-child(4),
.admin-table td:nth-child(4) { width: auto; }

.admin-table th:nth-child(5),
.admin-table td:nth-child(5) { width: auto; }

.admin-table th:nth-child(6),
.admin-table td:nth-child(6) { width: auto; }

/* Thumbnails */
.thumb {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Action links */
.admin-actions a {
    margin-right: 10px;
    font-weight: bold;
    text-decoration: none;
}
.admin-actions a.edit { color: #1565c0; }
.admin-actions a.delete { color: #c62828; }
.admin-actions a.view { color: #2e7d32; }
.admin-actions a:hover { text-decoration: underline; }

@media (max-width: 768px) {

  .admin-messages-table thead {
      display: none;
  }

  .admin-messages-table,
  .admin-messages-table tbody,
  .admin-messages-table tr,
  .admin-messages-table td {
      display: block;
      width: 100%;
  }

  .admin-messages-table tr {
      background: #fff;
      margin-bottom: 16px;
      padding: 14px;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }

  .admin-messages-table td {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 0;
  }

  .admin-messages-table td::before {
      content: attr(data-label);
      font-weight: 700;
      color: #555;
      flex: 0 0 30%;
      max-width: 30%;
  }

}


/* =========================================
   ADMIN MESSAGES — FORCE REAL TABLE LAYOUT
========================================= */
@media (min-width: 769px) {

  .admin-messages-table {
      display: table;
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
  }

  .admin-messages-table thead {
      display: table-header-group;
  }

  .admin-messages-table tbody {
      display: table-row-group;
  }

  .admin-messages-table tr {
      display: table-row;
  }

  .admin-messages-table th,
  .admin-messages-table td {
      display: table-cell;
      vertical-align: top;
      padding: 14px;
      border-bottom: 1px solid #ddd;
      word-break: break-word;
  }

}



/* =========================================================
   MOBILE: TRUE CARD LAYOUT FOR TABLES
========================================================= */



/* =========================================================
   SMALL MOBILE
========================================================= */
@media (max-width: 600px) {
    .polaroid { width: 100%; margin: 0 auto; }
    .header-inner { justify-content: center; }
}

/* =========================================================
   DASHBOARD — MOBILE RESPONSIVE FIX
========================================================= */
@media (max-width: 768px) {

    /* Disable desktop table behavior */
    .admin-table {
        table-layout: auto;
        background: transparent;
        border-radius: 0;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    /* Card-style rows */
    .admin-table tr {
        background: #ffffff;
        margin-bottom: 20px;
        padding: 14px;
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

    /* Labeled rows */
    .admin-table td {
        display: flex;
        justify-content: space-between;
        /*gap: 12px;*/
        padding: 10px 12px;
        margin-bottom: 8px;
        border: 1px solid #e0e0e0;
        border-radius: 10px;
        background: #f7f7f7;
        word-break: break-word;
    }

    /* Left-side label */
    .admin-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #444;
        flex-basis: 40%;
        max-width: 40%;
    }

   

    .admin-table .thumb {
        width: 100%;
       /* max-width: 180px;*/
        height: auto;
        margin: 0 auto;
        display: block;
    }

    /* Action buttons easier to tap */
    .admin-actions {
        text-align: right;
        width: 100%;
    }

    .admin-actions a {
        display: inline-block;
        margin: 6px 0 0 10px;
        padding: 8px 12px;
        border-radius: 8px;
        background: #f0f0f0;
    }
}


/* =========================================
   ADMIN MOBILE — PRODUCT IMAGE FIT FIX
========================================= */
@media (max-width: 768px) {

  /* Image container (card top) */
  .admin-dashboard .admin-table td:first-child {
      padding: 0;
      margin-bottom: 12px;
      background: transparent;
      border: none;
  }

  /* Product image itself */
  .admin-dashboard .admin-table .thumb {
      width: 100%;
      max-width: 100%;
      height: 200px;              /* controls visible image height */
      object-fit: cover;          /* KEY: fills area cleanly */
      border-radius: 12px;
      display: block;
      margin: 0 auto;
      background: #f3f3f3;
  }

}

@media (max-width: 768px) {

  .admin-dashboard .admin-table td:first-child {
      display: flex;
      justify-content: center;   /* horizontal */
      align-items: center;       /* vertical */
  }

  .admin-dashboard .admin-table .thumb {
      margin: 0;
  }

}
/* =========================================
   ADMIN MESSAGES — DESKTOP RESET (REQUIRED)
========================================= */
@media (min-width: 769px) {

  .admin-messages-table {
      display: table;
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
  }

  .admin-messages-table thead {
      display: table-header-group;
  }

  .admin-messages-table tbody {
      display: table-row-group;
  }

  .admin-messages-table tr {
      display: table-row;
  }

  .admin-messages-table th,
  .admin-messages-table td {
      display: table-cell;
      vertical-align: top;
      padding: 14px;
      border-bottom: 1px solid #ddd;
      word-break: break-word;
  }
}


/* =========================================================
   DASHBOARD MOBILE — TEXT FIX (FINAL)
========================================================= */
@media (max-width: 768px) {

    /* Stop vertical letter stacking */
    .admin-table td {
        word-break: normal !important;
        overflow-wrap: normal !important;
        white-space: normal;
    }

    /* Give value column more room */
    .admin-table td::before {
        flex-basis: 35%;
        max-width: 35%;
        white-space: nowrap;
        padding:8px;
    }

    /* Value content column */
    .admin-table td > * {
        flex: 1;
        text-align: right;
    }

    /* Fix action buttons stacking */
    .admin-actions {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        flex-wrap: wrap;
    }

    .admin-actions a {
        white-space: nowrap;
        padding: 8px 14px;
        border-radius: 999px;
        background: #e3f2fd;
        color: #1565c0;
        font-weight: 600;
    }
}
/* ================================
   ADMIN STATUS COLUMN FIX
================================ */
.admin-table td.status,
.admin-table td[data-label="Status"] {
    white-space: nowrap;
    overflow: visible;
    min-width: 90px;
}

.custom-upload-admin {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-delete-upload {
    background: #c62828;
    color: #fff;
    border: none;
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
}

.btn-delete-upload:hover {
    background: #a91f1f;
}
.admin-link {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 1.2rem;
}

.cart-container { max-width: 1000px; margin: 40px auto; }
.cart-panel {
    background:#fff;
    padding:28px;
    border-radius:18px;
    box-shadow:0 10px 30px rgba(0,0,0,0.12);
}
.cart-table { width:100%; border-collapse:collapse; }
.cart-table th, .cart-table td {
    padding:12px;
    border-bottom:1px solid #ddd;
}
.qty-input { width:70px; }
.cart-actions {
    margin-top:20px;
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}
.btn-home, .btn-update, .btn-checkout {
    padding:10px 18px;
    border-radius:8px;
    text-decoration:none;
    font-weight:600;
}
.btn-home { background:#777; color:#fff; }
.btn-update { background:#555; color:#fff; border:none; }
.btn-checkout { background:#0a7cff; color:#fff; }
.btn-remove {
    background:#c62828;
    color:#fff;
    border:none;
    padding:6px 10px;
    border-radius:6px;
}
.cart-subtotal {
    margin-top:16px;
    font-size:1.1rem;
}
@media (max-width: 600px) {

    /* Prevent table overflow on mobile */
    .cart-table {
        width: 100%;
        table-layout: fixed;
    }

    .cart-table td,
    .cart-table th {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Fix REMOVE button cutoff */
    .btn-remove {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin-top: 6px;
        text-align: center;
        white-space: nowrap;
    }

    /* Give the last column breathing room */
    .cart-table td:last-child {
        padding-right: 8px;
    }
}
@media (max-width: 600px) {

    /* Hide table header */
    .cart-table thead {
        display: none;
    }

    /* Card-style rows */
    .cart-table tr {
        display: block;
        background: #ffffff;
        margin-bottom: 16px;
        padding: 14px;
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

    .cart-table td {
        display: block;
        padding: 6px 0;
        border: none;
    }

    /* Product title */
    .cart-product strong {
        font-size: 1.05rem;
        display: block;
        margin-bottom: 4px;
    }

    /* Options */
    .cart-options {
        font-size: 0.9rem;
        color: #555;
    }

    /* Qty + Total row */
    .cart-qty,
    .cart-total {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: 600;
        margin-top: 10px;
    }

    .cart-qty::before {
        content: "Qty";
        color: #666;
    }

    .cart-total::before {
        content: "Total";
        color: #666;
    }

    /* Remove button */
    .cart-remove {
        margin-top: 12px;
    }

    .btn-remove {
        width: 100%;
        padding: 10px;
        border-radius: 10px;
        font-weight: 600;
    }
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 14px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.cart-table th {
    text-align: left;
    font-weight: 700;
}

.qty-input {
    width: 64px;
    padding: 6px;
}

@media (max-width: 700px) {

    .cart-table thead {
        display: none;
    }

    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        background: #fff;
        border-radius: 14px;
        padding: 16px;
        margin-bottom: 18px;
        box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    }

    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #555;
    }

    .qty-input {
        width: 72px;
    }

    .btn-remove {
        width: 100%;
        margin-top: 10px;
        padding: 10px;
        border-radius: 8px;
        font-weight: 600;
    }
}

/* ===== CART BASE ===== */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}
.cart-table th, .cart-table td {
    padding: 14px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}
.cart-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 6px;
}
.qty-input {
    width: 70px;
}

/* ===== MOBILE CART (CLEAN, SIMPLE) ===== */
@media (max-width: 700px) {

    .cart-table thead {
        display: none;
    }

    .cart-table tr {
        display: block;
        padding: 14px;
        border-bottom: 1px solid #ddd;
        background: #e9e9e9;
    }

    .cart-table td {
        position: relative;
        padding-left: 90px;
        padding-bottom: 10px;
        background: aliceblue;
        border-radius: 10px;
        margin-bottom: 8px;
    }

    .cart-qty,
    .cart-total {
        display: inline-block;
        width: 48%;
    }

    .cart-remove {
        margin-top: 10px;
    }

    .btn-remove {
        width: 100%;
        padding: 10px;
        border-radius: 8px;
    }
}

@media (max-width: 600px) {

    /* Hide Options label when the cell is empty */
    .cart-table td:nth-child(2):empty {
        display: none;
    }

    .cart-table td:nth-child(2):empty::before {
        content: none;
    }

}

@media (max-width: 600px) {

    /* Turn cart rows into stacked cards */
    .cart-table thead {
        display: none;
    }

    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    

    /* Label ALL cart cells */
    .cart-table td {
        position: relative;
        padding-left: 90px;
        padding-bottom: 10px;
        background: aliceblue;
        border-radius: 10px;
    }

    .cart-table td::before {
        position: absolute;
        left: 12px;
        top: 10px;
        font-weight: 600;
        color: #555;
        white-space: nowrap;
    }

    /* Explicit labels */
    .cart-table td:nth-child(1)::before { content: "Product"; }
    .cart-table td:nth-child(2)::before { content: "Options"; }
    .cart-table td:nth-child(3)::before { content: "Qty"; }
    .cart-table td:nth-child(4)::before { content: "Total"; }

    /* Action column (Remove button) */
    .cart-table td:nth-child(5)::before { content: ""; }

    /* Qty input alignment */
    .qty-input {
        width: 70px;
    }

    /* Remove button safety */
    .btn-remove {
        width: 100%;
        margin-top: 6px;
    }
}
/* =========================
   COOKIE CONSENT (ISOLATED)
========================= */
.ooc-cookie-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
    max-width: 360px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.35);
    padding: 16px;
    text-align: center;
    font-size: 0.9rem;
    z-index: 999999;
}

.ooc-cookie-banner.hidden {
    display: none;
}


.ooc-cookie-banner img {
    width: 44px;
    margin-bottom: 6px;
}

.ooc-cookie-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.ooc-accept-btn {
    background: #ff6f91;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    cursor: pointer;
}

.ooc-configure-btn {
    background: transparent;
    border: 2px solid #ff6f91;
    color: #ff6f91;
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    cursor: pointer;
}

.ooc-hidden {
    display: none;
}

.ooc-visible {
    display: block;
}
.ooc-cookie-settings {
    margin-top: 12px;
    font-size: 0.85rem;
    text-align: left;
}

.ooc-cookie-settings.hidden {
    display: none;
}

.ooc-cookie-settings label {
    display: block;
    margin-bottom: 6px;
}

/* =========================================
   ADMIN DASHBOARD — DESKTOP TABLE FIX
========================================= */
@media (min-width: 769px) {

    .admin-dashboard table,
    .admin-dashboard thead,
    .admin-dashboard tbody,
    .admin-dashboard tr {
        display: table;
        width: 100%;
    }

    .admin-dashboard th,
    .admin-dashboard td {
        display: table-cell;
        vertical-align: middle;
        width: auto;
    }

}
@media (max-width: 768px) {
    .admin-dashboard .admin-table thead {
        display: none;
    }

    .admin-dashboard .admin-table,
    .admin-dashboard .admin-table tbody,
    .admin-dashboard .admin-table tr,
    .admin-dashboard .admin-table td {
        display: block;
        width: 100%;
    }
}
/* =========================================================
   ADMIN DASHBOARD LAYOUT
========================================================= */
.admin-dashboard .dashboard-container{
  max-width: 1100px;
  margin: 40px auto;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.admin-dashboard .dashboard-nav{
  text-align:center;
  margin-bottom:30px;
  font-size:0.9rem;
}

.admin-dashboard .dashboard-nav a{
  margin:0 10px;
  font-weight:700;
  color:#2a7ae2;
  text-decoration:none;
}

.admin-dashboard .section-title{
  margin-top:40px;
  font-size:1.2rem;
  font-weight:800;
  border-bottom:2px solid #eee;
  padding-bottom:6px;
  margin-bottom:15px;
}

.admin-dashboard .admin-card{
  background:#fafafa;
  border-radius:10px;
  padding:22px;
  box-shadow:0 2px 10px rgba(0,0,0,0.12);
  margin-bottom:30px;
}

/* =========================================================
   ADMIN TABLES — DESKTOP (FORCE REAL TABLE)
========================================================= */
@media (min-width: 769px) {
  .admin-dashboard .admin-table{
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: rgba(255,255,255,0.92);
    border-radius: 10px;
    overflow: hidden;
  }

  .admin-dashboard .admin-table thead{
    display: table-header-group;
  }

  .admin-dashboard .admin-table tbody{
    display: table-row-group;
  }

  .admin-dashboard .admin-table tr{
    display: table-row;
  }

  .admin-dashboard .admin-table th,
  .admin-dashboard .admin-table td{
    display: table-cell;
    vertical-align: middle;
    border-bottom: 1px solid #ddd;
    padding: 14px 10px;
    word-break: normal;
    overflow-wrap: anywhere;
  }
}

/* =========================================================
   ADMIN TABLES — MOBILE CARD LAYOUT
========================================================= */
@media (max-width: 768px) {

  .admin-dashboard .admin-table{
    table-layout: auto;
    background: transparent;
    border-radius: 0;
  }

  .admin-dashboard .admin-table thead{
    display: none;
  }

  .admin-dashboard .admin-table,
  .admin-dashboard .admin-table tbody,
  .admin-dashboard .admin-table tr,
  .admin-dashboard .admin-table td{
    display: block;
    width: 100%;
  }

  .admin-dashboard .admin-table tr{
    background: rgba(255,255,255,0.95);
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }

  .admin-dashboard .admin-table td{
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #eee;
  }

  .admin-dashboard .admin-table td:last-child{
    border-bottom: none;
  }

  .admin-dashboard .admin-table td::before{
    content: attr(data-label);
    font-weight: 800;
    color: #555;
    flex: 0 0 38%;
    max-width: 38%;
    white-space: nowrap;
  }

  .admin-dashboard .admin-table td > *{
    flex: 1;
    text-align: right;
  }

  .admin-dashboard .admin-actions{
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
  }

  .admin-dashboard .admin-actions a{
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: #e3f2fd;
    color: #1565c0;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
  }
}

/* =========================================================
   ADMIN MESSAGES — HARD ISOLATION FIX
   Purpose: Force desktop table, allow mobile cards
========================================================= */

/* ---------- DESKTOP: FORCE REAL TABLE ---------- */
@media (min-width: 769px) {

  .admin-dashboard .admin-messages-table {
      display: table !important;
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
  }

  .admin-dashboard .admin-messages-table thead {
      display: table-header-group !important;
  }

  .admin-dashboard .admin-messages-table tbody {
      display: table-row-group !important;
  }

  .admin-dashboard .admin-messages-table tr {
      display: table-row !important;
  }

  .admin-dashboard .admin-messages-table th,
  .admin-dashboard .admin-messages-table td {
      display: table-cell !important;
      vertical-align: top;
      padding: 14px 12px;
      border-bottom: 1px solid #ddd;
      white-space: normal;
      word-break: break-word;
  }
}

/* ---------- MOBILE: CARD LAYOUT ONLY ---------- */
@media (max-width: 768px) {

  .admin-dashboard .admin-messages-table thead {
      display: none;
  }

  .admin-dashboard .admin-messages-table,
  .admin-dashboard .admin-messages-table tbody,
  .admin-dashboard .admin-messages-table tr,
  .admin-dashboard .admin-messages-table td {
      display: block;
      width: 100%;
  }

  .admin-dashboard .admin-messages-table tr {
      background: #ffffff;
      margin-bottom: 16px;
      padding: 14px;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }

  .admin-dashboard .admin-messages-table td {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 0;
      border: none;
  }

  .admin-dashboard .admin-messages-table td::before {
      content: attr(data-label);
      font-weight: 700;
      color: #555;
      flex: 0 0 35%;
      max-width: 35%;
      white-space: nowrap;
  }
}
/* =========================================================
   ADMIN MESSAGES — COLGROUP NEUTRALIZER
========================================================= */
.admin-dashboard .admin-messages-table colgroup,
.admin-dashboard .admin-messages-table col {
    width: auto !important;
}
/* =========================================================
   ADMIN MESSAGES — DIV BASED (FINAL)
========================================================= */
.admin-messages {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 40px;
}

.admin-message-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.message-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    align-items: flex-start;
    background: #e8f1ff;
    padding: 8px;
    border-radius: 8px;
}

.message-row .label {
    flex: 0 0 90px;
    font-weight: 700;
    color: #555;
    white-space: nowrap;
}

.message-row .value {
    flex: 1;
    color: #222;
    word-break: break-word;
}

.message-body {
    line-height: 1.5;
}

.message-actions {
    margin-top: 14px;
    text-align: right;
}

/* Desktop enhancement */
@media (min-width: 769px) {
    .admin-messages {
        grid-template-columns: repeat(2, 1fr);
    }
}
