/*-----------------------------------*\
  #main.css
\*-----------------------------------*/

/**
 * copyright 2022 codewithsadee
 */





/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {

  /**
   * colors
   *
   * MOVED. Every colour now lives in assets/css/colors.css, which defines both
   * the light and the dark palette in one place — mirroring Android's
   * tarka-ui/theme/Color.kt. Load it BEFORE this file.
   *
   * The old colour-named tokens (--white, --emerald, --platinum, ...) still
   * work: colors.css keeps each one at its exact previous value for light mode
   * and adds a dark counterpart, so the rules below did not have to change and
   * light mode renders as it always did. Prefer the semantic names in new code.
   */

  /**
   * typography
   */

  --ff-playfair-display: 'Playfair Display', serif;
  --ff-roboto: 'Roboto', sans-serif;

  --fs-1: 3rem;
  --fs-2: 2.4rem;
  --fs-3: 2rem;
  --fs-4: 1.8rem;
  --fs-5: 1.7rem;
  --fs-6: 1.5rem;
  --fs-7: 1.4rem;
  --fs-8: 1.3rem;
  --fs-9: 1rem;

  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;
  --fw-700: 700;

  /**
   * spacing
   */

  --section-padding: 80px;

  /**
   * radius
   */

  --radius-4: 4px;
  --radius-6: 6px;

  /**
   * shadow
   */

  --shadow-1: 0 12px 25px -8px hsla(0, 0%, 0%, 0.2);
  --shadow-2: -12px 0 25px -8px hsla(0, 0%, 0%, 0.2);
  --shadow-3: 12px 0 25px -8px hsla(0, 0%, 0%, 0.2);

  /**
   * transition
   */

  --transition-1: 0.05s ease;
  --transition-2: 0.25s ease;
  --cubic-in: cubic-bezier(0.51, 0.03, 0.64, 0.28);
  --cubic-out: cubic-bezier(0.33, 0.85, 0.4, 0.96);

}





/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

li { list-style: none; }

a {
  text-decoration: none;
  color: inherit;
}

a,
img,
span,
input,
label,
button,
ion-icon { display: block; }

/* img { height: auto; } */

input,
button {
  background: none;
  border: none;
  font: inherit;
}

input { width: 100%; }

/*
 * ⚠️ …except a checkbox or a radio, which have no content to be 100% OF.
 *
 * The rule above is for text fields. Applied to a checkbox it makes the BOX a
 * full-width flex item: on manager/adminRoster.html every state row rendered
 * as a 366px-wide checkbox with its label shoved to the far right and the text
 * wrapping. It read as a broken layout on that page and was this one line.
 */
input[type="checkbox"],
input[type="radio"] { width: auto; }

button { cursor: pointer; }

ion-icon { pointer-events: none; }

address { font-style: normal; }

:focus-visible { outline-offset: 4px; }

::selection {
  background-color: var(--black_50);
  color: var(--constant-light);
}

html {
  font-size: 10px;
  font-family: var(--ff-roboto);
  scroll-behavior: smooth;
}

body {
  font-size: 1.6rem;
  background-color: var(--surface);
}





/*-----------------------------------*\
  #REUSED STYLE
\*-----------------------------------*/

.container { padding-inline: 15px; }

.btn {
  background-color: var(--bg-color, var(--emerald));
  color: var(--color, var(--on-primary));
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  font-size: var(--fs, var(--fs-7));
  font-weight: var(--fw, var(--fw-500));
  padding: var(--padding, 15px 20px);
  border-radius: 50px;
  transition: var(--transition-2);
}

.btn ion-icon { font-size: 1.6rem; }

.btn-primary:is(:hover, :focus) { --bg-color: var(--green-pigment); }

.section { padding-block: var(--section-padding); }

.h2 {
  font-size: var(--fs-1);
  font-weight: var(--fw-500);
  color: var(--russian-violet);
}

.h3 {
  font-family: var(--ff-playfair-display);
  font-size: var(--fs-4);
}

.w-100 { width: 100%; }

.has-scrollbar {
  display: flex;
  overflow-x: auto;
  padding-block-end: 30px;
  margin-block-end: -30px;
  scroll-snap-type: inline mandatory;
}

.has-scrollbar::-webkit-scrollbar { height: 10px; }

.has-scrollbar::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 15px;
}

.has-scrollbar:hover::-webkit-scrollbar-thumb { background-color: var(--black_25); }

.section-subtitle {
  color: var(--emerald);
  font-family: var(--ff-playfair-display);
  font-size: var(--fs-3);
  font-style: italic;
  margin-block-end: 10px;
}

.section-subtitle,
.section-title { text-align: center; }

.grid-list {
  display: grid;
  gap: 30px;
}


.rating-wrapper {
  color: var(--yellow-orange);
  display: flex;
  justify-content: var(--justify-content, center);
  gap: 2px;
  font-size: 1.4rem;
}

.product-card {
  background-color: var(--mint-cream);
  padding: 30px 20px;
  text-align: center;
  outline: 2px solid transparent;
  transition: var(--transition-2);
}

.product-card:is(:hover, :focus-within) { outline-color: var(--emerald); }

.product-card .card-banner {
  position: relative;
  max-width: max-content;
  margin-inline: auto;
  margin-block-end: 20px;
}

.product-card .card-banner img { transition: var(--transition-2); }

.product-card:is(:hover, :focus-within) .card-banner img { opacity: 0.6; }

.product-card .btn-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-card .product-btn {
  position: relative;
  background-color: var(--emerald);
  font-size: var(--fs, 2rem);
  color: var(--on-primary);
  padding: var(--padding, 12px);
  border-radius: 50%;
  opacity: 0;
  transition: var(--transition-2);
}

.product-card .product-btn ion-icon { --ionicon-stroke-width: 50px; }

.tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--black_90);
  border-radius: var(--radius-4);
  font-size: var(--fs-7);
  min-width: max-content;
  padding: 4px 12px;
  pointer-events: none;
  opacity: var(--opacity, 0);
  transition: var(--transition-2);
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  border: 5px solid transparent;
  border-bottom-color: var(--black_90);
  border-right-color: var(--black_90);
}

.product-card:is(:hover, :focus-within) .product-btn { opacity: 1; }

.product-card .product-btn:is(:hover, :focus) { background-color: var(--surface-inverse); }

.product-card .product-btn:is(:hover, :focus) .tooltip { --opacity: 1; }

.product-card .rating-wrapper { margin-block-end: 10px; }

.product-card .card-title {
  color: var(--russian-violet);
  font-size: var(--fs-4);
  font-weight: var(--fw-500);
  margin-block-end: 10px;
}

.product-card .card-title > a { transition: var(--transition-2); }

.product-card .card-title > a:is(:hover, :focus) { color: var(--emerald); }

.product-card .price-wrapper {
  font-size: var(--fs-6);
  margin-block-end: 15px;
}

.product-card .price-wrapper .del { color: var(--battleship-gray); }

.product-card .price-wrapper .price {
  color: var(--emerald);
  margin-inline-start: 5px;
}

.product-card .btn {
  margin-inline: auto;
  --padding: 12px 18px;
}





/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/

.top-bar {
  background-color: var(--surface-inverse);
  color: var(--emerald);
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
  text-align: center;
  padding-block: 10px;
}

.logo {
  color: var(--gunmetal-2);
  font-family: var(--ff-playfair-display);
  font-size: 3rem;
}

.logo .span {
  display: inline-block;
  color: var(--emerald);
}

.nav-wrapper .logo { text-align: center; }

.nav-wrapper .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  row-gap: 20px;
  padding-inline: 10%;
  padding-block: 20px;
}

.nav-wrapper .h1 { min-width: 100%; }

.header-action {
  display: flex;
  min-width: 70%;
  justify-content: space-between;
  align-items: center;
}

.nav-open-btn {
  background-color: var(--emerald);
  color: var(--on-primary);
  font-size: 2.8rem;
  padding: 6px;
  border-radius: var(--radius-4);
  transition: var(--transition-1);
}

.nav-open-btn:is(:hover, :focus) { background-color: var(--green-pigment); }

.header-action-btn {
  position: relative;
  background-color: var(--mint-cream);
  color: var(--space-cadet);
  font-size: 2rem;
  padding: 10px;
  border-radius: 50%;
}

.header-action-btn:is(:hover, :focus):not(:focus-visible) {
  outline: 2px solid var(--emerald);
}

.btn-badge {
  position: absolute;
  background-color: var(--emerald);
  color: var(--on-primary);
  font-size: var(--fs-9);
  font-weight: var(--fw-600);
  padding: 3px 7px;
  border-radius: 50px;
  top: -5px;
  right: -5px;
}

.search-wrapper { position: relative; }

.search-wrapper.active .search-icon,
.search-wrapper .close-icon { display: none; }

.search-wrapper .search-icon,
.search-wrapper.active .close-icon { display: block; }

.input-wrapper {
  position: absolute;
  background-color: var(--surface);
  top: calc(100% + 25px);
  left: 0;
  width: 260px;
  transform: translateX(var(--translateX, -85px)) scale(var(--scale, 0.5));
  box-shadow: var(--shadow-1);
  padding: 20px;
  border-radius: var(--radius-4);
  visibility: hidden;
  opacity: 0;
  transition: 0.15s var(--cubic-in);
}

.search-wrapper.active .input-wrapper {
  visibility: visible;
  opacity: 1;
  --scale: 1;
  transition: 0.35s var(--cubic-out);
}

.search-input {
  color: var(--eerie-black);
  font-size: var(--fs-6);
  border: 1px solid var(--platinum);
  padding: 15px;
  padding-inline-end: 40px;
  outline: none;
}

.search-input::-webkit-search-cancel-button { display: none; }

.search-input:focus { border-color: var(--emerald); }

.search-submit {
  color: var(--space-cadet);
  font-size: 2rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 33px;
}

.navbar {
  background-color: var(--surface-inverse);
  position: fixed;
  top: 0;
  left: -300px;
  max-width: 300px;
  width: 100%;
  min-height: 100%;
  padding: 100px 13px 30px;
  box-shadow: var(--shadow-3);
  z-index: 2;
  visibility: hidden;
  transition: 0.25s var(--cubic-in);
}

.navbar.active {
  transform: translateX(300px);
  visibility: visible;
  transition: 0.5s var(--cubic-out);
}

.nav-close-btn {
  color: var(--white_50);
  font-size: 2.8rem;
  border: 1px solid;
  padding: 5px;
  position: absolute;
  top: 30px;
  right: 30px;
  transition: var(--transition-1);
}

.nav-close-btn:is(:hover, :focus) { color: var(--constant-light); }

.navbar-link {
  color: var(--constant-light);
  font-size: var(--fs-6);
  font-weight: var(--fw-700);
  padding: 17px;
  border-radius: var(--radius-4);
}

.navbar-link:is(:hover, :focus) { background-color: var(--white_10); }





/*-----------------------------------*\
  #ASIDE
\*-----------------------------------*/

.side-panel {
  position: fixed;
  top: 0;
  right: -300px;
  background-color: var(--surface);
  max-width: 300px;
  width: 100%;
  height: 100%;
  padding: 100px 20px 25px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-2);
  z-index: 6;
  visibility: hidden;
  transition: 0.25s var(--cubic-in);
}

.side-panel.active {
  visibility: visible;
  transform: translateX(-300px);
  transition: 0.5s var(--cubic-out);
}

.panel-close-btn {
  position: absolute;
  top: 20px;
  right: 15px;
  background-color: var(--surface-inverse);
  color: var(--on-surface-inverse);
  font-size: 2.6rem;
  padding: 7px;
  border-radius: var(--radius-4);
}

.panel-list { margin-block-end: auto; }

.panel-item:not(:last-child) {
  padding-block-end: 20px;
  border-block-end: 1px solid var(--cultured);
  margin-block-end: 20px;
}

.panel-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.panel-item .item-title {
  color: var(--russian-violet);
  font-size: var(--fs-7);
  font-weight: var(--fw-700);
  margin-block-end: 6px;
}

.panel-item .item-value {
  color: var(--battleship-gray);
  font-size: var(--fs-8);
}

.panel-item .item-close-btn {
  margin-inline-start: auto;
  color: var(--onyx);
  font-size: 2.5rem;
}

.panel-item .item-close-btn ion-icon { --ionicon-stroke-width: 25px; }

.side-panel .subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-end: 30px;
}

.side-panel .subtotal-text {
  color: var(--russian-violet);
  font-weight: var(--fw-700);
}

.side-panel .subtotal-value {
  color: var(--emerald);
  font-size: var(--fs-3);
  font-weight: var(--fw-700);
}

.panel-btn {
  background-color: var(--emerald);
  color: var(--on-primary);
  font-size: var(--fs-7);
  text-align: center;
  padding: 20px 15px;
  border-radius: var(--radius-6);
  transition: var(--transition-1);
}

.panel-btn:is(:hover, :focus) { background-color: var(--green-pigment); }





/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/

.footer {
  background-image: url("../images/hero-left-bg.png"), url("../images/hero-right-bg.png");
  background-color: var(--surface-inverse);
  background-repeat: no-repeat, no-repeat;
  background-position: bottom left, top right;
  color: var(--on-surface-inverse-variant);
}

.footer-top { padding-block: 60px; }

.footer-top .container {
  display: grid;
  gap: 60px;
}

.footer .logo {
  font-size: 3.2rem;
  color: var(--constant-light);
  font-weight: var(--fw-700);
}

.footer-text {
  line-height: 2;
  margin-block: 20px 15px;
}

.social-list {
  display: flex;
  gap: 15px;
}

.social-link {
  border: 1px solid;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition-1);
}

.social-link:is(:hover, :focus) { color: var(--emerald); }

.footer-list-title {
  color: var(--constant-light);
  font-size: var(--fs-2);
  font-weight: var(--fw-700);
  margin-block-end: 25px;
}

.footer-link {
  font-size: var(--fs-6);
  margin-block-start: 16px;
  transition: var(--transition-1);
}

.footer-link:is(:hover, :focus) { color: var(--emerald); }

.footer-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-item:not(:last-child) { margin-block-end: 16px; }

.footer-item .contact-icon { font-size: 2.4rem; }

.footer-top .newsletter-text {
  line-height: 1.8;
  margin-block-end: 25px;
}

.footer-form { position: relative; }

.footer-input {
  background-color: var(--surface);
  color: var(--battleship-gray);
  font-size: var(--fs-6);
  padding: 16px 20px;
  padding-inline-end: 50px;
  border-radius: var(--radius-4);
}

.footer-form-btn {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: var(--emerald);
  font-size: 2.2rem;
}

.footer-bottom {
  background-color: var(--surface-inverse);
  /* Declares its own foreground: this band paints its own dark background, so
     inheriting a themed body colour would leave it unreadable in dark mode. */
  color: var(--on-surface-inverse-variant);
  padding-block: 20px;
  font-size: var(--fs-7);
}

.copyright {
  text-align: center;
  line-height: 1.7;
  margin-block-end: 10px;
}

.copyright-link {
  display: inline-block;
  color: var(--emerald);
}

.footer-bottom-list {
  display: flex;
  justify-content: center;
  gap: 20px;
}





/*-----------------------------------*\
  #BACK TO TOP
\*-----------------------------------*/

.back-to-top {
  position: fixed;
  bottom: 10px;
  right: 20px;
  background-color: var(--emerald_70);
  font-size: 2rem;
  color: var(--constant-light);
  padding: 8px;
  border-radius: 50%;
  border: 2px solid var(--emerald);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-2);
  z-index: 1;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-10px);
}

.back-to-top:is(:hover, :focus) { background-color: var(--emerald); }





/*-----------------------------------*\
  #BREADCUMB
\*-----------------------------------*/

.breadcumb-wrapper {
  background-image: url(../images/Banner_image.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-color: hsl(245deg 12% 4% / 65%);
  background-blend-mode: darken;
  text-align: center;
  color: var(--constant-light);
  min-height: 250px;
  display: grid;
  place-content: center;
  gap: 20px;
}

.page-title {
  --fs-1: 3.5rem;
  font-size: var(--fs-1);
}

.breadcumb-list {
  display: flex;
  justify-content: center;
}

.breadcumb-item {
  font-size: var(--fs-3);
  display: flex;
}

.breadcumb-item:not(:last-child)::after {
  content: "/";
  margin-inline: 10px;
}

.breadcumb-link { transition: var(--transition-2); }

.breadcumb-link:is(:hover, :focus) { color: var(--emerald); }

/* Lightweight inline breadcrumb trail — for listing pages that already have a
   header and must not be pushed down by the full .breadcumb-wrapper hero. */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 1.3rem;
  color: var(--roman-silver);
  margin: 0 0 14px;
}
.crumbs a { color: var(--roman-silver); text-decoration: none; transition: var(--transition-2); }
.crumbs a:is(:hover, :focus) { color: var(--emerald); }
.crumbs li { display: flex; align-items: center; list-style: none; }
.crumbs li:not(:last-child)::after { content: "/"; margin-inline: 8px; color: var(--light-gray); }
.crumbs li:last-child { color: var(--gunmetal-2); font-weight: 600; }





/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/

/**
 * responsive for larger than 480px screen
 */

@media (min-width: 480px) {

  /**
   * HEADER
   */

  .nav-wrapper .container { padding-inline: 25px; }

  .nav-wrapper .h1 {
    min-width: max-content;
    order: 2;
  }

  .nav-open-btn { order: 1; }

  .header-action {
    order: 3;
    min-width: max-content;
    gap: 15px;
  }

  .input-wrapper { --translateX: -220px; }

}





/**
 * responsive for larger than 569px screen
 */

@media (min-width: 569px) {

  /**
   * CUSTOM PROPERTY
   */

  :root {

    /**
     * typography
     */

    --fs-1: 3.2rem;

  }



  /**
   * REUSED STYLE
   */

  .container {
    max-width: 520px;
    margin-inline: auto;
  }



  /**
   * HEADER
   */

  .nav-wrapper .container { max-width: unset; }

}





/**
 * responsive for larger than 768px screen
 */

@media (min-width: 768px) {

  /**
   * CUSTOM PROPERTY
   */

  :root {

    /**
     * typography
     */

    --fs-1: 3.8rem;

  }



  /**
   * REUSED STYLE
   */

  .container { max-width: 700px; }



  /**
   * FOOTER
   */

  .footer-top .container { grid-template-columns: 1fr 1fr; }



  /**
   * BREADCUMB
   */

  .breadcumb-wrapper { min-height: 400px; }

  .page-title { --fs-1: 5rem; }

}





/**
 * responsive for larger than 992px screen
 */

@media (min-width: 992px) {

  /**
   * REUSED STYLE
   */

  .container {
    padding-inline: 40px;
    max-width: 1020px;
  }



  /**
   * HEADER
   */

  .nav-open-btn,
  .nav-close-btn { display: none; }

  .nav-wrapper .container {
    padding-inline: 40px;
    max-width: 1040px;
    /* Keep logo, nav links and action icons on ONE row on desktop. Without
       nowrap the action icons wrapped to a second line at ~992-1150px widths
       (logo + 7 links + 5 icons didn't fit, so .header-action wrapped down). */
    flex-wrap: nowrap;
  }

  .navbar {
    all: unset;
    order: 2;
    min-width: 0; /* let the nav shrink so the icons never wrap below it */
  }

  .navbar-link {
    color: var(--gunmetal-2);
    padding: 0 5px;
    --fs-6: 1.6rem;
  }

  .navbar-link:is(:hover, :focus) {
    background-color: unset;
    color: var(--emerald);
  }

  .navbar-list {
    display: flex;
    flex-wrap: wrap; /* nav links wrap internally if cramped, icons stay right */
    gap: 10px;
  }

  .header-action-btn { padding: 15px; }



  /**
   * FOOTER
   */

  .footer-top .container {
    grid-template-columns: 1.3fr 0.6fr 1fr 1fr;
    gap: 30px;
  }

  .footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .copyright { margin-block-end: 0; }

}





/**
 * responsive for larger than 1200px screen
 */

@media (min-width: 1200px) {

  /**
   * REUSED STYLE
   */

  .container { max-width: 1200px; }



  /**
   * HEADER
   */

  .nav-wrapper .container { max-width: 1200px; }

}



/**
 * PRODUCT TEXT INPUT
 *
 * A piece's name and description, one language at a time — see
 * assets/js/productTextInput.js. Lives in the shared stylesheet because the
 * component is mounted by four pages across three audiences (vendor, admin,
 * manager), which otherwise meant four copies of these rules.
 *
 * Only theme tokens, no literals: the chips sit on the same surfaces the rest of
 * each form does, in either mode.
 */

.pti-hint {
  font-size: 13px;
  color: var(--on-surface-variant);
  margin: 0 0 10px;
  line-height: 1.5;
}

.pti-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-end: 14px;
}

.pti-lang {
  font: inherit;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  cursor: pointer;
  user-select: none;
}

.pti-lang:hover { border-color: var(--primary); }

/* Selected = the language being edited. */
.pti-lang.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

/* Complete = name AND description filled. The tick is the same rule the
   validator reads, so a seller is never told a language is done when Submit
   disagrees. */
.pti-lang.is-complete::before {
  content: "\2713\00a0";
  font-weight: 700;
}

.pti-field { margin-block-end: 14px; }

.pti-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface-variant);
  margin-block-end: 6px;
}

.pti-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: var(--surface);
  color: var(--input-text);
}

.pti-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* The manager screen locks the English name — it is the Storage folder the
   piece's photos already live under. */
.pti-input:disabled {
  background: var(--surface-variant);
  color: var(--on-surface-dim);
  cursor: not-allowed;
}

textarea.pti-input { min-height: 84px; resize: vertical; line-height: 1.45; }
