/* iCandy Retail - theme matched to greshamicandy.com */
:root {
  --ic-dark: #2b2b2b;
  --ic-pink: #e0709e;
  --ic-pink-dark: #c9578a;
  --ic-cream: #fffaf7;
  --ic-text: #333333;
  --ic-muted: #767676;
  --ic-border: #e7e0dd;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ic-text);
  background: var(--ic-cream);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { background: var(--ic-dark); color: #fff; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.site-logo { display: flex; align-items: center; gap: 8px; font-size: 24px; letter-spacing: 3px; font-weight: 600; color: #fff; }
.site-logo-mark { font-size: 26px; line-height: 1; }
.site-logo-img { height: 46px; width: auto; border-radius: 10px; display: block; }
.site-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.site-nav a { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #eee; }
.site-nav a:hover { color: var(--ic-pink); }
.header-icons { display: flex; align-items: center; gap: 18px; }
.cart-badge { position: relative; }
.cart-count { position: absolute; top: -8px; right: -10px; background: var(--ic-pink); color: #fff; font-size: 11px; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }

/* Hero - short, cute, candy-colored welcome banner */
.hero { position: relative; background: linear-gradient(135deg,#ffb6d9,#e0709e 55%,#a978d6); display: flex; align-items: center; justify-content: center; text-align: center; padding: 26px 24px; }
.hero-inner { color: #fff; width: 100%; max-width: 560px; }
.hero-badge { font-size: 34px; line-height: 1; margin-bottom: 4px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.15)); }
.hero-badge-img { height: 60px; width: 60px; object-fit: cover; border-radius: 50%; margin: 0 auto 6px; box-shadow: 0 3px 8px rgba(0,0,0,.25); border: 3px solid #fff; }
.hero-inner h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: .5px; }
.hero-inner p { margin: 0; font-size: 14px; opacity: .95; }

/* Scrolling strip of candy photos just under the hero */
.candy-marquee { overflow: hidden; background: #fff; padding: 14px 0; border-bottom: 3px solid var(--ic-pink); }
.candy-marquee-track { display: flex; gap: 16px; width: max-content; animation: candy-scroll 32s linear infinite; }
.candy-marquee:hover .candy-marquee-track { animation-play-state: paused; }
.candy-marquee-track img { width: 74px; height: 74px; object-fit: cover; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(43,25,20,.16); background: #f3ecec; flex-shrink: 0; }
@keyframes candy-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 480px) {
  .hero-inner h1 { font-size: 20px; }
  .candy-marquee-track img { width: 56px; height: 56px; }
}

.section-title { text-align: center; text-transform: uppercase; letter-spacing: 3px; color: var(--ic-muted); font-size: 15px; margin: 48px 0 28px; }
.slogan-banner { text-align: center; font-size: 20px; font-style: italic; color: var(--ic-pink-dark); padding: 28px 16px 8px; }

/* Shop tiles (homepage) */
.shop-tiles { display: flex; gap: 40px; justify-content: center; align-items: center; padding: 48px 24px 60px; flex-wrap: wrap; }
.shop-tile { position: relative; display: block; width: 340px; max-width: 100%; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; box-shadow: 0 16px 34px rgba(43,25,20,.18); transition: transform .25s ease, box-shadow .25s ease; }
.shop-tile:hover { transform: rotate(0deg) scale(1.035); box-shadow: 0 22px 44px rgba(43,25,20,.26); }
.shop-tile-candy { transform: rotate(-5deg); background: linear-gradient(165deg,#fdeaf1,#fff6f9 60%); }
.shop-tile-candy:hover { transform: rotate(0deg) scale(1.035); }
.shop-tile-popcorn { transform: rotate(5deg); background: linear-gradient(165deg,#fff2dc,#fffaf0 60%); }
.shop-tile-popcorn:hover { transform: rotate(0deg) scale(1.035); }
.shop-tile-art { position: absolute; inset: 0; }
.shop-tile-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 28px; text-align: center; background: linear-gradient(to top, rgba(20,12,10,.68), rgba(20,12,10,0) 85%); }
.shop-tile-label span { display: inline-block; color: #fff; font-size: 22px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; padding: 10px 26px; border: 2px solid rgba(255,255,255,.85); border-radius: 40px; }
.shop-tile-candy .shop-tile-label span { background: rgba(224,112,158,.35); }
.shop-tile-popcorn .shop-tile-label span { background: rgba(178,111,38,.35); }

/* Candy piece shapes drawn with plain CSS (no external image assets needed) */
.candy-piece { position: absolute; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 5px rgba(255,255,255,.55), 0 4px 10px rgba(0,0,0,.15); }
.candy-lolli-stick { position: absolute; width: 4.5%; aspect-ratio: 1 / 7; background: #fff; border-radius: 3px; box-shadow: 0 2px 4px rgba(0,0,0,.1); }
.candy-gumdrop { position: absolute; aspect-ratio: 1; border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%; box-shadow: inset 0 -6px 10px rgba(0,0,0,.08), inset 0 6px 8px rgba(255,255,255,.35); }
.candy-pill { position: absolute; aspect-ratio: 1 / 0.3; border-radius: 40px; box-shadow: 0 4px 8px rgba(0,0,0,.12); }
.candy-dot { position: absolute; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }

/* Popcorn box + caramel corn kernels, also plain CSS shapes */
.popcorn-box { position: absolute; background: repeating-linear-gradient(90deg, #c94f4f 0 10%, #fff6ec 10% 20%); box-shadow: 0 8px 18px rgba(60,30,10,.25); border-radius: 4px 4px 2px 2px; }
.popcorn-box::before { content: ""; position: absolute; left: 6%; right: 6%; top: -8%; height: 16%; background: rgba(255,255,255,.55); border-radius: 3px 3px 0 0; }
.kernel { position: absolute; aspect-ratio: 1; background: linear-gradient(135deg,#f4d79a,#c9863b); border-radius: 42% 58% 55% 45% / 55% 42% 58% 45%; box-shadow: inset -3px -3px 6px rgba(120,70,20,.35), inset 2px 2px 5px rgba(255,244,220,.6); }
.kernel-light { background: linear-gradient(135deg,#fff0d2,#e7b568); border-radius: 55% 45% 42% 58% / 45% 55% 42% 58%; }

@media (max-width: 720px) {
  .shop-tiles { gap: 24px; padding: 32px 16px 44px; }
  .shop-tile { width: 45%; transform: none !important; }
  .shop-tile:hover { transform: scale(1.02) !important; }
}
@media (max-width: 480px) {
  .shop-tiles { flex-direction: column; }
  .shop-tile { width: 100%; max-width: 320px; }
}

/* Candy page - left sidebar of cute category image tiles + main product grid */
.candy-layout { display: flex; gap: 28px; align-items: flex-start; margin-top: 28px; }
.candy-sidebar { width: 190px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.candy-main { flex: 1; min-width: 0; }
.cat-tile {
  position: relative; display: block; height: 84px; border-radius: 14px; overflow: hidden;
  background-color: #fdeaf1; background-size: cover; background-position: center;
  box-shadow: 0 4px 12px rgba(43,25,20,.12); border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease;
}
.cat-tile::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,12,10,.72), rgba(20,12,10,.12) 65%, rgba(20,12,10,0));
}
.cat-tile:hover { transform: translateX(3px) scale(1.02); box-shadow: 0 8px 18px rgba(43,25,20,.2); }
.cat-tile-active { border-color: var(--ic-pink); box-shadow: 0 0 0 3px rgba(224,112,158,.28); }
.cat-tile-name {
  position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 1;
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .4px;
  text-shadow: 0 2px 5px rgba(0,0,0,.55); line-height: 1.25;
}
@media (max-width: 780px) {
  .candy-layout { flex-direction: column; }
  .candy-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .cat-tile { width: calc(33.333% - 8px); height: 68px; }
}
@media (max-width: 480px) {
  .cat-tile { width: calc(50% - 6px); }
}

/* Candy page search bar */
.candy-search { display: flex; gap: 8px; justify-content: center; align-items: center; max-width: 480px; margin: 20px auto 0; flex-wrap: wrap; }
.candy-search input[type="search"] { flex: 1; min-width: 180px; padding: 10px 16px; border: 1px solid var(--ic-border); border-radius: 30px; font-size: 14px; font-family: inherit; background: #fff; }
.candy-search input[type="search"]:focus { outline: none; border-color: var(--ic-pink); }
.candy-search-clear { font-size: 12.5px; color: var(--ic-muted); text-decoration: underline; }

/* Package size line on product cards */
.pc-pack { font-size: 12px; color: var(--ic-muted); margin-top: -4px; }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; padding: 0 0 48px; }
.product-card { background: #fff; border: 1px solid var(--ic-border); border-radius: 10px; overflow: hidden; transition: box-shadow .15s ease; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.product-card img { width: 100%; height: 190px; object-fit: cover; background: #f3ecec; }
.product-card .pc-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .pc-name { font-size: 14.5px; font-weight: 600; line-height: 1.3; min-height: 38px; }
.product-card .pc-price { color: var(--ic-pink-dark); font-weight: 700; font-size: 16px; }
.badge { display: inline-block; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 20px; margin-bottom: 4px; width: fit-content; }
.badge-new { background: #e5f5ec; color: #1f8a4c; }
.badge-best { background: #fdf0d5; color: #b5790a; }

.btn { display: inline-block; border: 1px solid var(--ic-pink); color: var(--ic-pink-dark); background: transparent; padding: 10px 22px; text-transform: uppercase; letter-spacing: 1px; font-size: 12.5px; border-radius: 30px; cursor: pointer; text-align: center; }
.btn:hover { background: var(--ic-pink); color: #fff; }
.btn-solid { background: var(--ic-pink); color: #fff; }
.btn-solid:hover { background: var(--ic-pink-dark); }
.btn-dark { background: var(--ic-dark); color: #fff; border-color: var(--ic-dark); }
.btn-small { padding: 6px 14px; font-size: 11px; }

/* Footer */
.site-footer { background: var(--ic-dark); color: #ccc; margin-top: 60px; padding: 40px 0 24px; font-size: 13px; }
.site-footer a { color: #ddd; }
.site-footer .footer-cols { display: flex; gap: 40px; flex-wrap: wrap; justify-content: center; text-align: center; }
.footer-logo { height: 64px; width: auto; border-radius: 8px; margin: 0 auto 10px; }
.footer-legal { text-align: center; margin-top: 20px; font-size: 12px; }
.footer-legal a { color: #aaa; }
.footer-bottom { text-align: center; margin-top: 24px; color: #999; font-size: 12px; }

/* Forms / admin */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--ic-border); border-radius: 6px; font-size: 14px; font-family: inherit; }
.card { background: #fff; border: 1px solid var(--ic-border); border-radius: 10px; padding: 24px; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.flash-ok { background: #e5f5ec; color: #1f8a4c; }
.flash-err { background: #fdeaea; color: #c0392b; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--ic-border); vertical-align: middle; }
table.admin-table th { text-transform: uppercase; font-size: 11px; letter-spacing: .5px; color: var(--ic-muted); }
/* min-width/min-height keep the thumbnail from being squeezed to nothing by the global
   `img { max-width: 100% }` reset above when a narrow admin table auto-shrinks its columns to
   fit - the table just overflows its scrollable card instead (see .card overflow-x:auto on the
   product list) rather than the photo disappearing. flex-shrink:0 covers the cart page's flex row. */
table.admin-table img.thumb { width: 44px; height: 44px; min-width: 44px; min-height: 44px; object-fit: cover; border-radius: 6px; background: #f3ecec; flex-shrink: 0; }

.admin-shell { display: flex; min-height: 100vh; }
.admin-side { width: 210px; background: var(--ic-dark); color: #fff; padding: 24px 0; flex-shrink: 0; }
.admin-side a { display: block; padding: 12px 24px; font-size: 13.5px; color: #ddd; }
.admin-side a:hover, .admin-side a.active { background: var(--ic-pink); color: #fff; }
.admin-main { flex: 1; padding: 32px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }

/* Collapsible sidebar nav group (e.g. "Retail Sales") - a native <details>/<summary> so it needs
   no JS. <summary> is styled to look exactly like the plain nav links around it, with a small
   arrow that rotates open/closed; its child links are indented slightly to show they're a
   sub-group. Starts open automatically when the active page is inside it (see nav_group_open()
   in layout-top.php), so a user already on e.g. Products doesn't have to know to expand it. */
.admin-nav-group summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; font-size: 13.5px; color: #ddd; cursor: pointer; list-style: none; }
.admin-nav-group summary::-webkit-details-marker { display: none; }
.admin-nav-group summary:hover { background: var(--ic-pink); color: #fff; }
.admin-nav-group summary .nav-caret { transition: transform .15s ease; font-size: 10px; opacity: .7; }
.admin-nav-group[open] summary .nav-caret { transform: rotate(90deg); }
.admin-nav-group .admin-nav-sub a { padding-left: 38px; font-size: 13px; }

@media (max-width: 700px) {
  .admin-shell { flex-direction: column; }
  .admin-side { width: 100%; display: flex; overflow-x: auto; padding: 0; }
  .admin-side a { white-space: nowrap; }
}

/* Events page (public) - narrow single-column list, modeled closely on the
   greshamicandy.com/icandy-events reference: day-of-week, then a large date line,
   bold title + time, muted location, optional photo, and a collapsed description
   behind a "+ Event Details" toggle. */
.events-title { font-size: 22px; letter-spacing: 2px; }
.events-intro { text-align: center; font-size: 15px; color: var(--ic-muted); max-width: 520px; margin: 0 auto 44px; line-height: 1.6; }
.events-list { max-width: 560px; margin: 0 auto 60px; }
.event-entry { padding: 26px 0; border-bottom: 1px solid var(--ic-border); }
.event-entry:first-child { padding-top: 6px; }
.event-entry:last-child { border-bottom: none; }
.event-dow { font-size: 14px; color: var(--ic-muted); }
.event-date { font-size: 30px; font-weight: 400; color: var(--ic-pink-dark); line-height: 1.15; margin: 2px 0 10px; }
.event-title { font-size: 17px; font-weight: 700; color: var(--ic-text); }
.event-time { font-size: 15px; font-weight: 700; color: var(--ic-text); margin-top: 2px; }
.event-location { color: var(--ic-muted); font-size: 14.5px; line-height: 1.5; margin-top: 14px; }
.event-image { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; margin-top: 16px; background: #f3ecec; }
.event-desc { display: none; color: var(--ic-text); font-size: 14.5px; line-height: 1.6; margin-top: 16px; }
.event-desc.is-open { display: block; }
.event-toggle { display: block; margin-top: 14px; padding: 0; border: none; background: none; font-family: inherit; font-size: 14.5px; color: var(--ic-pink-dark); cursor: pointer; }
.event-toggle:hover { text-decoration: underline; }
.events-empty { text-align: center; color: var(--ic-muted); padding: 40px 24px; }

@media (max-width: 480px) {
  .events-list { padding: 0 4px; }
  .event-date { font-size: 26px; }
}

/* Admin: events list + image preview on the edit form */
.admin-table .event-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #f3ecec; }

/* Event-reservation booking system (public): info page (reservations.php), booking wizard
   (reservations/book.php), and the shared calendar widget used by both. */
.rsv-hero { text-align: center; max-width: 620px; margin: 0 auto 20px; }
.rsv-hero-text { font-size: 15px; color: var(--ic-muted); line-height: 1.7; margin-bottom: 20px; }
.rsv-book-btn { display: inline-block; }
.rsv-subtitle { text-align: center; font-size: 20px; margin: 48px 0 6px; color: var(--ic-text); }
.rsv-lead { text-align: center; font-size: 14.5px; color: var(--ic-muted); max-width: 560px; margin: 0 auto 28px; line-height: 1.6; }

.rsv-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 900px; margin: 0 auto 20px; }
.rsv-tier-card { border: 1px solid var(--ic-border); border-radius: 10px; padding: 22px 18px; text-align: center; }
.rsv-tier-card h3 { margin: 0 0 2px; font-size: 16px; letter-spacing: 1px; }
.rsv-tier-days { color: var(--ic-muted); font-size: 12.5px; margin-bottom: 10px; }
.rsv-tier-price { font-size: 30px; color: var(--ic-pink-dark); margin-bottom: 10px; }
.rsv-tier-card p { font-size: 13.5px; color: var(--ic-muted); line-height: 1.5; margin: 0 0 8px; }
.rsv-tier-extra { font-weight: 600; color: var(--ic-text) !important; }

.rsv-addons { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto 20px; }
.rsv-addon-card { border: 1px solid var(--ic-border); border-radius: 10px; padding: 18px; }
.rsv-addon-card h4 { margin: 0 0 6px; font-size: 15px; }
.rsv-addon-card p { font-size: 13.5px; color: var(--ic-muted); line-height: 1.5; margin: 0 0 8px; }
.rsv-addon-price { font-weight: 700; color: var(--ic-pink-dark) !important; }

.rsv-faq { max-width: 640px; margin: 0 auto 20px; }
.rsv-faq-item { border-bottom: 1px solid var(--ic-border); padding: 14px 0; }
.rsv-faq-item summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.rsv-faq-item p { margin: 10px 0 0; font-size: 14px; color: var(--ic-muted); line-height: 1.6; }

.rsv-book-bottom { text-align: center; margin: 40px 0 60px; }

/* Calendar widget (booking wizard + read-only public view) - status colors are deliberately
   generic (no names/times shown), per the "no other customer information" requirement. */
.rsv-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 700; }
.rsv-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.rsv-cal-dow { text-align: center; font-size: 11px; color: var(--ic-muted); padding-bottom: 4px; }
.rsv-cal-day { text-align: center; padding: 10px 0; border-radius: 6px; font-size: 13.5px; background: #f7f3f1; }
.rsv-cal-open { background: #fff; border: 1px solid var(--ic-border); cursor: pointer; }
.rsv-cal-open:hover { background: #fbeef4; }
.rsv-cal-busy { background: #fdf1f6; border: 1px solid var(--ic-pink); cursor: pointer; }
.rsv-cal-closed { background: #f0f0f0; color: var(--ic-muted); }
.rsv-cal-past { background: transparent; color: #ccc; }
.rsv-cal-selected { outline: 2px solid var(--ic-pink-dark); }

.rsv-addon-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--ic-border); font-weight: normal; }
.rsv-addon-check input { width: auto; margin-top: 3px; }
.rsv-agreement-body { font-size: 14px; line-height: 1.6; }
.rsv-total-big { font-size: 26px; font-weight: 700; color: var(--ic-pink-dark); margin-top: 12px; }
.rsv-agree-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-weight: normal; font-size: 13.5px; }
.rsv-agree-check input { width: auto; margin-top: 3px; }

@media (max-width: 720px) {
  .rsv-tiers { grid-template-columns: 1fr; }
}

/* Admin: Bookings section (calendar with names + list/detail views) */
.admin-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.admin-cal-dow { text-align: center; font-size: 11px; color: var(--ic-muted); padding-bottom: 4px; }
.admin-cal-day { min-height: 84px; border: 1px solid var(--ic-border); border-radius: 6px; padding: 6px; font-size: 12px; background: #fff; }
.admin-cal-day.is-past { background: #fafafa; color: #bbb; }
.admin-cal-day.is-closed { background: #f4f0f0; }
.admin-cal-daynum { font-weight: 700; margin-bottom: 4px; }
.admin-cal-booking { display: block; background: var(--ic-pink); color: #fff; border-radius: 4px; padding: 2px 5px; margin-bottom: 3px; font-size: 11px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-cal-booking:hover { background: var(--ic-pink-dark); }
.admin-cal-closed-tag { display: inline-block; background: #999; color: #fff; border-radius: 4px; padding: 1px 5px; font-size: 10px; }
