:root {
  --rose-gold: #b76e79;
  --rose-gold-dark: #994c56;
  --rose-gold-light: #f4d3d8;
  --dark: #2b2b2b;
  --light: #fff;
  --shelf-color: #d9c7b8;
  --success-bg: rgba(212, 237, 218, 0.9);
  --success-color: #155724;
}

/* ========== FONT-FACES ========== */  
@font-face {
  font-family: 'Sinthya';
  src: url('/fonts/Sinthya.woff2') format('woff2'),
       url('/fonts/Sinthya.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Colombia';
  src: url('/fonts/Colombia-Regular.woff2') format('woff2'),
       url('/fonts/Colombia-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Colombia';
  src: url('/fonts/Colombia-Bold.woff2') format('woff2'),
       url('/fonts/Colombia-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* ========== GLOBAL STYLES ========== */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Colombia', sans-serif;
  font-size: 14px;
  height: 100%;
  overflow-x: hidden;
  background: linear-gradient(to bottom, #686466 0%, #9b9899 100%);
  background-attachment: fixed;
}

/* ---------------- Shop Background & Gray Side Walls ---------------- */
.shop-background {
  min-height: 100vh;
  width: 100%;
  background: url('/shop/images/blackshelves6.svg') no-repeat center top;
  background-size: contain;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

/* ---------------- Scalable Container ---------------- */
.shop-container {
  position: relative;
  width: 1000px;
  height: 1500px; 
  transform-origin: top center;
  margin: 0 auto;
}

@media screen and (min-aspect-ratio: 10/15) {
  .shop-container {
    transform: scale(calc(100vh / 1500));
  }
}
@media screen and (max-aspect-ratio: 10/15) {
  .shop-container {
    transform: scale(calc(100vw / 1000));
  }
}

/* ---------------- Brand Logo Formatting ---------------- */
.brand {
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand img {
  display: block;
  max-width: 220px;
  max-height: 100px;
  object-fit: contain;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.brand:hover img {
  transform: scale(1.1);
  filter: brightness(1.2);
}

/* ---------------- 7-Slot Shelf & Gap Positioning ---------------- */
.shelf-gap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 400px;
  height: 60px;
}

.shelf-gap[data-shelf="1"] { top: 23%; }
.shelf-gap[data-shelf="2"] { top: 32%; }
.shelf-gap[data-shelf="3"] { top: 43%; }
.shelf-gap[data-shelf="4"] { top: 52%; }
.shelf-gap[data-shelf="5"] { top: 62%; }
.shelf-gap[data-shelf="6"] { top: 71%; }
.shelf-gap[data-shelf="7"] { top: 80%; }

/* ---------------- Shop Logo ---------------- */
.shop-logo-wrapper {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
}

.shop-logo {
  white-space: nowrap;
  font-family: 'Sinthya', cursive;
  font-size: 5rem;
  color: var(--rose-gold);
  text-shadow:
    0 0 10px rgba(255, 205, 210, 0.8),
    0 0 20px rgba(255, 183, 197, 0.7),
    0 0 40px rgba(255, 183, 197, 0.6),
    0 0 80px rgba(255, 183, 197, 0.5);
  opacity: 0;
  animation: fadeInGlow 1.5s ease forwards;
}

@keyframes fadeInGlow {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.shop-logo a.secret-login {
  color: inherit;
  text-decoration: none;
  font-family: inherit;
  display: inline-block;
  cursor: default;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.shop-logo a.secret-login:hover {
  color: inherit;
  opacity: 1;
}

/* ---------------- Cart Info (Slide-in Sidebar) ---------------- */
.cart-info {
  position: fixed;
  top: 25px;
  right: 18px; /* Pushes the menu inside, off the scrollbar */
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99; /* Keeps it under native browser scroll overlays if needed */
  pointer-events: none;
}

.cart-info a {
  display: block;
  width: 170px;
  text-align: center;
  background: var(--rose-gold);
  color: var(--light);
  text-decoration: none;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 10px; /* Changed to rounded corners on all sides so it looks floating */
  transform: translateX(150%);
  animation: slide-in-right 0.8s ease forwards;
  box-shadow: -2px 4px 10px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  transition: background 0.3s ease, transform 0.2s ease;
  margin: 0;
  box-sizing: border-box;
}

.cart-info a:nth-child(1) { animation-delay: 0.2s; }
.cart-info a:nth-child(2) { animation-delay: 0.4s; }
.cart-info a:nth-child(3) { animation-delay: 0.6s; }

.cart-info a.btn-admin {
  background: #2b2b2b;
  color: #ffd700;
  border-left: 3px solid #ffd700;
}

.cart-info a.btn-admin:hover {
  background: #1a1a1a;
  color: #fff;
}

.cart-info a:hover {
  background: var(--rose-gold-dark);
  transform: translateX(0) scale(1.05);
}

@keyframes slide-in-right {
  to { transform: translateX(0); }
}

/* ---------------- Success Message ---------------- */
.success-msg {
  background: var(--success-bg);
  color: var(--success-color);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  text-align: center;
  font-weight: bold;
}

/* ---------------- Product Cards ---------------- */
.product {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 15px;
  width: 180px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 35px rgba(0,0,0,0.35);
}

.product img {
  width: 100%;
  height: auto;
  margin-bottom: 12px;
  border-radius: 10px;
  object-fit: cover;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: 8px 12px;
  margin-top: 10px;
  background: var(--rose-gold);
  color: var(--light);
  text-decoration: none;
  font-weight: bold;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--rose-gold-dark);
  transform: translateY(-2px);
}

/* ---------------- Card Frame ---------------- */
#card-frame {
  width: 100%;
  max-width: 400px;
  min-height: 150px;
  margin: 16px auto;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ---------------- Mobile Layout ---------------- */
@media (max-width: 768px) {
  .shop-background {
    background-size: auto 100%;
    background-position: center center;
  }
  .shop-logo { font-size: 3rem; }
  .brand img { max-width: 140px; max-height: 60px; }

  .cart-info {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
  }

  .cart-info a {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 10px;
    transform: none;
    animation: none;
    flex: 1;
    text-align: center;
  }
  
  .product {
    width: 90%;
    max-width: 350px;
    margin: 10px auto;
  }

  .btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
  }

  #card-frame {
    max-width: 100%;
  }
}

/* ========== CHECKOUT & STATUS CARDS ========== */
.checkout-card-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  width: 100%;
  max-width: 500px;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 20;
}

.checkout-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
              0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  animation: cardPopIn 0.5s ease forwards;
}

@keyframes cardPopIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.success-icon {
  font-size: 3.5rem;
  margin-bottom: 10px;
  line-height: 1;
}

.checkout-card h2 {
  font-family: 'Colombia', sans-serif;
  font-size: 2rem;
  color: var(--dark);
  margin: 0 0 10px 0;
  font-weight: bold;
}

.checkout-card .subtitle {
  color: #666;
  font-size: 1.1rem;
  margin: 0 0 25px 0;
}

.order-box {
  background: var(--rose-gold-light);
  border: 1px dashed var(--rose-gold);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.order-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--rose-gold-dark);
  font-weight: bold;
}

.order-value {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--dark);
  letter-spacing: 0.5px;
}

.card-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn-primary {
  padding: 12px 30px;
  font-size: 1rem;
  border-radius: 30px;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .checkout-card-wrapper {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    padding: 120px 20px 40px 20px;
    margin: 0 auto;
  }

  .checkout-card {
    padding: 30px 20px;
  }
}

/* ========== FAILURE ========== */
.error-box {
  background: rgba(248, 215, 218, 0.9);
  border: 1px solid #f5c6cb;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.error-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #721c24;
  font-weight: bold;
}

.error-value {
  font-size: 1rem;
  color: #721c24;
  word-break: break-word;
}

.btn-secondary {
  background: #6c757d;
  padding: 12px 25px;
  font-size: 1rem;
  border-radius: 30px;
  letter-spacing: 0.5px;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* ========== CART PAGE STYLES ========== */
.cart-card-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  width: 100%;
  max-width: 850px;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 20;
}

.cart-card {
  max-width: 100%;
  padding: 35px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.95rem;
}

.cart-table th {
  background: var(--rose-gold-light);
  color: var(--rose-gold-dark);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  padding: 12px;
  border-bottom: 2px solid var(--rose-gold);
}

.cart-table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  text-align: center;
  color: var(--dark);
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left !important;
  font-weight: bold;
}

.cart-img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.brand-cell {
  text-align: center;
}

.brand-logo-small {
  max-width: 50px;
  max-height: 28px;
  object-fit: contain;
  display: block;
  margin: 0 auto 4px auto;
  background: rgba(0, 0, 0, 0.75);
  padding: 4px 6px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.total-cell {
  font-weight: bold;
  color: var(--rose-gold-dark);
}

.btn-remove {
  display: inline-block;
  color: #dc3545;
  font-size: 1.4rem;
  font-weight: bold;
  text-decoration: none;
  width: 28px;
  height: 28px;
  line-height: 24px;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-remove:hover {
  background: #f8d7da;
  color: #721c24;
}

.cart-summary {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  margin: 20px 0 25px 0;
  padding-top: 15px;
  border-top: 2px dashed #eee;
}

.summary-label {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--dark);
}

.summary-amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--rose-gold-dark);
}

.cart-actions {
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .cart-card-wrapper {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    padding: 120px 15px 40px 15px;
  }

  .cart-card {
    padding: 20px 15px;
  }

  .cart-actions {
    flex-direction: column-reverse;
  }

  .cart-actions .btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

/* Spinner for Loading / Checkout State */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--rose-gold-light);
  border-top: 4px solid var(--rose-gold);
  border-radius: 50%;
  margin: 0 auto 20px auto;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========== ADMIN PRODUCTS PAGE STYLES ========== */
body.admin-body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url('/shop/images/wood-background.jpg') no-repeat center center fixed; 
  background-size: cover;
  padding: 40px 20px;
  color: #333;
  margin: 0;
  position: relative;
}

body.admin-body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: -1;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1250px;
  margin: 0 auto 30px auto;
}

.header-title { 
  color: #fff; 
  text-shadow: 1px 1px 3px rgba(0,0,0,0.6); 
  margin: 0; 
  font-weight: 300; 
}

.btn-back {
  display: inline-block;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: background 0.3s, transform 0.2s;
}

.btn-back:hover {
  background: #fff;
  transform: translateY(-2px);
}

.container { 
  max-width: 1250px; 
  margin: 0 auto; 
}

.card { 
  background: rgba(255, 255, 255, 0.95); 
  padding: 25px; 
  border-radius: 8px; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
  margin-bottom: 30px; 
}

.card h3 { 
  margin-top: 0; 
  font-weight: 400; 
  color: #444; 
  border-bottom: 1px solid #ddd; 
  padding-bottom: 10px; 
  margin-bottom: 20px; 
}

.form-row { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 15px; 
  margin-bottom: 15px; 
}

.form-row input, 
.form-row select { 
  flex: 1; 
  min-width: 150px; 
  padding: 10px; 
  border: 1px solid #ccc; 
  border-radius: 4px; 
  box-sizing: border-box; 
  background-color: #fff;
}

.form-row-center {
  align-items: center;
}

.form-row-grid {
  display: flex;
  gap: 10px;
}

.input-label {
  font-size: 13px;
  color: #666;
}

.section-desc {
  font-size: 13px;
  color: #555;
  margin-top: 0;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

button { 
  background: #a96071; 
  color: white; 
  border: none; 
  padding: 10px 20px; 
  cursor: pointer; 
  border-radius: 20px; 
  font-weight: bold; 
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
  transition: background 0.3s; 
}

button:hover { 
  background: #8e4c5b; 
}

.btn-green { background: #4caf50; }
.btn-green:hover { background: #388e3c; }

.btn-blue { background: #007bff; }
.btn-blue:hover { background: #0056b3; }

.btn-small { 
  padding: 5px 10px; 
  font-size: 12px; 
  border-radius: 4px; 
}

.alert-success { 
  color: #155724; 
  background: #d4edda; 
  padding: 15px; 
  border-radius: 4px; 
  margin-bottom: 20px; 
  border: 1px solid #c3e6cb; 
}

.alert-error { 
  color: #721c24; 
  background: #f8d7da; 
  padding: 15px; 
  border-radius: 4px; 
  margin-bottom: 20px; 
  border: 1px solid #f5c6cb; 
}

.search-container { 
  display: flex; 
  gap: 10px; 
  align-items: center; 
  margin-bottom: 20px; 
  flex-wrap: wrap;
}

.search-input { 
  flex: 2; 
  min-width: 220px;
  padding: 10px 15px; 
  border: 1px solid #ccc; 
  border-radius: 20px; 
  font-size: 14px; 
  box-sizing: border-box; 
}

.filter-select {
  flex: 1;
  min-width: 160px;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
  background-color: #fff;
  box-sizing: border-box;
}

table { 
  width: 100%; 
  border-collapse: collapse; 
}

th, td { 
  padding: 10px 8px; 
  text-align: left; 
  border-bottom: 1px solid #eee; 
  font-size: 13px; 
  vertical-align: middle; 
}

th { 
  color: #666; 
  font-weight: normal; 
  border-bottom: 2px solid #ddd; 
}

tr:hover { 
  background-color: #f9f9f9; 
}

.subtext {
  color: #888;
}

.empty-table-cell {
  text-align: center;
  padding: 30px;
}

.inline-input { 
  width: 70px; 
  padding: 4px; 
  border: 1px solid #ccc; 
  border-radius: 3px; 
}

.img-thumb { 
  width: 40px; 
  height: 40px; 
  object-fit: cover; 
  border-radius: 4px; 
  border: 1px solid #ddd; 
}

.no-img { 
  width: 40px; 
  height: 40px; 
  background: #eee; 
  color: #aaa; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 10px; 
  border-radius: 4px; 
}

.modal-overlay { 
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(0,0,0,0.6); 
  z-index: 1000; 
  justify-content: center; 
  align-items: center; 
}

.modal-content { 
  background: #fff; 
  width: 90%; 
  max-width: 550px; 
  padding: 25px; 
  border-radius: 8px; 
  box-shadow: 0 5px 20px rgba(0,0,0,0.3); 
  position: relative; 
}

.modal-close { 
  position: absolute; 
  top: 15px; 
  right: 20px; 
  font-size: 24px; 
  cursor: pointer; 
  color: #888; 
}

.modal-title {
  margin-bottom: 15px;
}

.modal-form-group { 
  margin-bottom: 12px; 
}

.modal-form-group label { 
  display: block; 
  font-size: 12px; 
  font-weight: bold; 
  margin-bottom: 4px; 
  color: #555; 
}

.modal-form-group input,
.modal-form-group select { 
  width: 100%; 
  padding: 8px; 
  border: 1px solid #ccc; 
  border-radius: 4px; 
  box-sizing: border-box; 
  background-color: #fff;
}

.modal-actions {
  text-align: right;
  margin-top: 20px;
}