/* ============================================================
   Tillageworx — Global Site Styles
   Repo: twx26mon/webflow-footer-scripts
   Load via: <link rel="stylesheet" href="YOUR_RAW_GITHUB_URL">
   ============================================================ */

/* ── Quote Cart: Qty controls ─────────────────────────────── */
.qr-qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qr-qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c2934a;
  transition:
    color 0.15s,
    transform 0.1s,
    opacity 0.15s;
}
.qr-qty-btn:hover {
  color: #a87a38;
  opacity: 0.85;
}
.qr-qty-btn:active {
  transform: scale(0.88);
  opacity: 0.7;
}
.qr-qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}

/* ── Quote Cart: Remove button ────────────────────────────── */
.qr-remove-btn {
  display: block;
  margin: 6px auto 0;
  background: none;
  border: none;
  color: #c2934a;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition:
    color 0.15s,
    transform 0.1s,
    opacity 0.15s;
  line-height: 1;
}
.qr-remove-btn:hover {
  color: #a87a38;
  opacity: 0.85;
}
.qr-remove-btn:active {
  transform: scale(0.88);
  opacity: 0.7;
}

/* ── Quote Cart: Browse button ────────────────────────────── */
.qr-browse-row {
  margin-top: 16px;
}
.qr-browse-btn {
  display: inline-block;
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: #c2934a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition:
    color 0.15s,
    transform 0.1s,
    opacity 0.15s;
  cursor: pointer;
}
.qr-browse-btn:hover {
  color: #a87a38;
  opacity: 0.85;
}
.qr-browse-btn:active {
  transform: scale(0.97);
  opacity: 0.7;
}

/* ── Global Form & Quote Review Form: Inputs ──────────────── */
/* Hide form initially to prevent FOUC (Flash of Unstyled Content) */
#qr-form-section {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
#qr-form-section.qr-ready {
  opacity: 1 !important;
  visibility: visible !important;
}
#quote-form-block {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
#quote-form-block.qr-ready {
  opacity: 1 !important;
  visibility: visible !important;
}

#qr-form-section .w-form,
.twx-form {
  width: 100%;
}
#qr-form-section .form-input,
#qr-form-section input[type="text"],
#qr-form-section input[type="email"],
#qr-form-section input[type="tel"],
#qr-form-section textarea,
#qr-form-section select,
.twx-form .form-input,
.twx-form input[type="text"],
.twx-form input[type="email"],
.twx-form input[type="tel"],
.twx-form textarea,
.twx-form select {
  width: 100%;
  box-sizing: border-box;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.4;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
  margin-bottom: 12px;
}
#qr-form-section .form-input::placeholder,
#qr-form-section input::placeholder,
#qr-form-section textarea::placeholder,
.twx-form .form-input::placeholder,
.twx-form input::placeholder,
.twx-form textarea::placeholder {
  color: #666;
}
#qr-form-section .form-input:focus,
#qr-form-section input:focus,
#qr-form-section textarea:focus,
#qr-form-section select:focus,
.twx-form .form-input:focus,
.twx-form input:focus,
.twx-form textarea:focus,
.twx-form select:focus {
  outline: none;
  border-color: #c2934a;
  box-shadow: 0 0 0 3px rgba(194, 147, 74, 0.15);
}
#qr-form-section label,
.twx-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c2934a;
  margin-bottom: 5px;
  margin-top: 4px;
}
#qr-form-section textarea,
.twx-form textarea {
  min-height: 100px;
  resize: vertical;
}
#qr-form-section select,
.twx-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c2934a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  color: #fff;
}
#qr-form-section select option,
.twx-form select option {
  background: #1a1a1a;
  color: #fff;
}
#qr-form-section .w-checkbox,
.twx-form .w-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
}
#qr-form-section .w-checkbox input[type="checkbox"],
.twx-form .w-checkbox input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #c2934a;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Quote Review Form: Address sub-row (town/state/postcode) ── */
.qr-addr-row {
  display: flex;
  gap: 12px;
  width: 100%;
}
.qr-addr-town {
  flex: 2 1 0%;
  min-width: 0;
}
.qr-addr-state {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 80px;
}
.qr-addr-postcode {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 90px;
}

/* ── Quote Review Form: Side-by-side field rows ───────────── */
.qr-name-row,
.qr-contact-row,
.qr-delivery-row {
  display: flex !important;
  gap: 16px !important;
  width: 100% !important;
}
.qr-name-row > *,
.qr-contact-row > *,
.qr-delivery-row > * {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  width: 0 !important;
}
.qr-name-row > * > *,
.qr-contact-row > * > *,
.qr-name-row input,
.qr-name-row .w-input,
.qr-name-row .input-container,
.qr-name-row .form-field-wrapper {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* ── Quote Review Form: Delivery address toggle ───────────── */
.qr-same-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  margin-top: -4px;
}
.qr-same-address-row label {
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  cursor: pointer;
}
.qr-same-address-row input[type="checkbox"] {
  accent-color: #c2934a;
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}
.qr-delivery-input-wrapper {
  display: none;
  margin-top: 16px;
}
.qr-delivery-input-wrapper.visible {
  display: block;
}
/* Hide Webflow static delivery address label (replaced by JS) */
#qr-address ~ label,
label[for="qr-address"] {
  display: none !important;
}

/* ── Quote Review Form: Section heading ───────────────────── */
#qr-form-section h3.qr-form-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c2934a;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

/* ── Quote Review Form: Submit button ─────────────────────── */
#qr-submit-btn {
  width: 100% !important;
  background: linear-gradient(
    135deg,
    #b8833e 0%,
    #d4a55c 40%,
    #e8b86d 60%,
    #c2934a 100%
  ) !important;
  background-size: 200% auto !important;
  color: #111 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 18px 24px !important;
  cursor: pointer !important;
  margin-top: 16px !important;
  transition:
    background-position 0.4s,
    transform 0.15s,
    box-shadow 0.2s !important;
  box-shadow:
    0 4px 20px rgba(194, 147, 74, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
#qr-submit-btn:hover,
.twx-submit-btn:hover {
  background-position: right center !important;
  box-shadow:
    0 6px 28px rgba(194, 147, 74, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px) !important;
}
#qr-submit-btn:active,
.twx-submit-btn:active {
  transform: scale(0.98) translateY(0) !important;
  box-shadow: 0 2px 8px rgba(194, 147, 74, 0.3) !important;
}

/* ── Quote Review: Freight disclaimer ─────────────────────── */
.qr-freight-disclaimer {
  margin-top: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.06);
  border-left: 3px solid #c2934a;
  border-radius: 0 6px 6px 0;
  color: #bbb;
  font-size: 13px;
  line-height: 1.7;
}
.qr-freight-disclaimer .qr-freight-phone {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  color: #c2934a;
  font-size: 13px;
  letter-spacing: 0.03em;
}

/* ── Quote Review: Parts container ───────────────────────── */
#qr-parts-container {
  padding-top: 8px;
}

/* ── Brands nav: active pill ──────────────────────────────── */
.brands-nav .w--current {
  background: #000 !important;
  color: #fff !important;
}
/* Chevron points down on active brand pill */
.brands-nav .w--current svg {
  transform: rotate(90deg) !important;
  transition: transform 0.2s;
}

@media (min-width: 768px) {
  .brands-nav {
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: center;
    overflow-x: visible;
  }
  .brands-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 767px) {
  .brands-nav::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 56px;
    pointer-events: none;
    background: linear-gradient(
      to left,
      rgba(26, 26, 26, 0.88),
      transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .brands-nav.twx-scroll-hint::after {
    opacity: 1;
  }
}

.brands-nav.twx-skid-active {
  animation: twx-nav-skid 0.45s ease-out;
}

@keyframes twx-nav-skid {
  0% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-12px);
  }
  55% {
    transform: translateX(0);
  }
  75% {
    transform: translateX(-6px);
  }
  100% {
    transform: translateX(0);
  }
}

/* ── Quote Review Form: T&C Link ──────────────────────── */
.qr-tc-row a {
  color: #e8b86d;
  text-decoration: underline;
  font-weight: 800;
  transition: color 0.2s ease;
}
.qr-tc-row a:hover {
  color: #fff;
}

/* ── Quote Review Form: Mobile Summary Dropdown ───────────────────────────
   DESKTOP (768px+): toggle hidden, parts + summary always visible
   MOBILE (767px and below): toggle visible, parts + summary collapsed
   until user taps the toggle. Right col (summary) stacks above form.
   ─────────────────────────────────────────────────────────────────────── */

/* Always hidden on desktop */
.qr-mobile-toggle {
  display: none !important;
}

.qr-mobile-toggle .qr-mobile-chevron {
  transition: transform 0.3s ease;
}
.qr-mobile-toggle.expanded .qr-mobile-chevron {
  transform: rotate(180deg);
}
.qr-mobile-total {
  color: #fff;
  font-size: 15px;
}

/* ── Desktop: layout + parts + summary always visible ── */
@media (min-width: 768px) {
  #qr-flex-row {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 40px !important;
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  #qr-form-section {
    flex: 1 1 320px !important;
    min-width: 0 !important;
  }

  #qr-right-col {
    flex: 1 1 280px !important;
    min-width: 0 !important;
    flex-direction: column !important;
    gap: 24px !important;
  }

  #qr-parts-container,
  #qr-summary-container {
    display: block !important;
  }
}

/* ── Mobile layout ── */
@media (max-width: 767px) {
  /* Stack columns normally (not reversed) — order property handles position */
  #qr-flex-row {
    flex-direction: column !important;
    gap: 16px !important;
  }

  /* Right col (summary + toggle) sits above the form */
  #qr-right-col {
    width: 100% !important;
    flex: none !important;
    margin-bottom: 0 !important;
    order: -1;
  }

  #qr-form-section {
    width: 100% !important;
    flex: none !important;
  }

  /* Show the toggle button on mobile */
  .qr-mobile-toggle {
    display: flex !important;
    width: 100%;
    background: #1a1a1a;
    color: #c2934a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }

  /* Parts + summary hidden by default on mobile — shown when .expanded */
  #qr-parts-container:not(.expanded),
  #qr-summary-container:not(.expanded) {
    display: none !important;
  }

  /* Table tweaks for narrow screens */
  .qr-parts-table th:nth-child(2),
  .qr-parts-table td:nth-child(2) {
    display: none;
  }
  .qr-parts-table th:nth-child(5),
  .qr-parts-table td:nth-child(5) {
    display: table-cell !important;
  }
  .qr-parts-table {
    font-size: 12px;
  }
  .qr-parts-table td,
  .qr-parts-table th {
    padding: 10px 6px;
  }
  .qr-item-img {
    width: 36px !important;
    height: 36px !important;
    margin-right: 8px !important;
  }
  .qr-qty-controls {
    gap: 4px;
  }
  .qr-qty-btn {
    width: 22px;
    height: 22px;
    font-size: 15px;
  }
}

/* ── Quote Review: Parts Table ───────────────────────────── */
.qr-parts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.qr-parts-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c2934a;
  border-bottom: 1px solid #2a2a2a;
}
.qr-parts-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #1a1a1a;
  vertical-align: middle;
  color: #fff;
}
.qr-item-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: transparent;
  border-radius: 4px;
  margin-bottom: 6px;
  display: block;
}
.qr-item-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}
.qr-item-code {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.qr-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #1e1e1e;
  font-size: 14px;
  color: #ccc;
}
.qr-summary-total {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  border-bottom: none;
  padding-top: 14px;
}
.qr-summary-note {
  font-size: 12px;
  color: #888;
  margin-top: 8px;
  font-style: italic;
}

/* ── Mobile Navigation Dropdown Styling ────────────────────── */
@media (max-width: 991px) {
  .nav-link.dropdown {
    justify-content: left !important;
    text-align: left !important;
    color: rgba(191, 191, 191, 1) !important;
  }
  .nav-about-drop .w-dropdown-toggle,
  .nav-about-drop .w-dropdown-toggle * {
    text-align: left !important;
    justify-content: left !important;
    float: none !important;
  }
  .Text-Block-30,
  .nav-about-drop div {
    text-align: left !important;
    color: rgba(191, 191, 191, 1) !important;
  }
  .nav-menu-mobile .nav-link.w--current {
    color: #fff !important;
    border-left: 3px solid #c8a84b !important;
    padding-left: 13px !important;
  }
  .nav-menu-mobile .nav-link.dropdown.w--current {
    color: #fff !important;
    border-left: 3px solid #c8a84b !important;
    padding-left: 13px !important;
  }
  .nav-menu-mobile .menu-sublink.w--current {
    color: #fff !important;
    border-left: 3px solid #c8a84b !important;
    padding-left: 17px !important;
    background: transparent !important;
  }
}

/* ── Browse Brands nav — premium ghost pill buttons ──────── */
.brands-nav {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

@media (max-width: 767px) {
  .brands-nav {
    justify-content: flex-start !important;
  }

  .brands-nav.browse-brands {
    width: calc(100% + 56px);
    max-width: none;
    margin-left: -28px;
    margin-right: -28px;
    position: relative;
    left: auto;
    transform: none;
    padding: 0;
    box-sizing: border-box;
  }

  .brands-nav__list {
    display: flex !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 12px !important;
    padding: 4px 16px 12px 16px !important;
  }

  .brands-nav__list::-webkit-scrollbar {
    display: none !important;
  }

  .brands-nav::-webkit-scrollbar {
    height: 6px;
  }

  .brands-nav::-webkit-scrollbar-thumb {
    background: #c2934a;
    border-radius: 4px;
  }
}

.brands-nav__btn {
  color: #c2934a !important;
  border: 1px solid rgba(194, 147, 74, 0.28) !important;
  border-radius: 100px !important;
  padding: 10px 22px !important;
  background: rgba(194, 147, 74, 0.04) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.25s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  position: relative !important;
  flex: 1 1 0 !important;
  flex-shrink: 1 !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.brands-nav__btn * {
  color: #c2934a !important;
}

.brands-nav__btn .brand-header-icon,
.brands-nav__btn:hover .brand-header-icon {
  color: rgba(255, 255, 255, 0.6) !important;
}

.brands-nav__btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 100px;
  padding: 1px;
  background: conic-gradient(
    from var(--btn-angle) at 50% 50%,
    transparent 0%,
    transparent 75%,
    rgba(194, 147, 74, 1) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
}

.brands-nav__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(194, 147, 74, 0) 30%,
    rgba(194, 147, 74, 0.5) 50%,
    rgba(194, 147, 74, 0) 70%,
    transparent 100%
  );
  background-size: 200% 100%;
  background-position: 200% center;
  pointer-events: none;
  opacity: 0;
}

.brands-nav__btn:hover {
  border-color: rgba(194, 147, 74, 0.15) !important;
  background: rgba(194, 147, 74, 0.08) !important;
  box-shadow:
    0 0 22px rgba(194, 147, 74, 0.12),
    0 0 6px rgba(194, 147, 74, 0.08) !important;
  transform: scale(1.03) !important;
}

.brands-nav__btn:hover::before {
  animation: twx-border-travel 2s linear forwards;
}

.brands-nav__btn:hover::after {
  animation: twx-shine-swipe 2s linear forwards;
}

body a.brands-nav__btn.w--current {
  border-color: rgba(194, 147, 74, 0.5) !important;
  background: #000 !important;
  box-shadow: none !important;
  pointer-events: none;
}
body a.brands-nav__btn.w--current,
body a.brands-nav__btn.w--current:hover,
body a.brands-nav__btn.w--current *,
body a.brands-nav__btn.w--current:hover * {
  color: #fff !important;
}
body a.brands-nav__btn.w--current .brand-header-icon {
  transform: rotate(90deg) !important;
  transition: transform 0.2s;
  color: rgba(255, 255, 255, 0.6) !important;
}

@keyframes twx-border-travel {
  0% {
    --btn-angle: 0deg;
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  30% {
    opacity: 1;
  }
  40% {
    --btn-angle: 360deg;
    opacity: 0;
  }
  100% {
    --btn-angle: 360deg;
    opacity: 0;
  }
}

@keyframes twx-shine-swipe {
  0%,
  39% {
    background-position: 200% center;
    opacity: 0;
  }
  40% {
    opacity: 1;
    background-position: 200% center;
  }
  65% {
    background-position: -100% center;
    opacity: 1;
  }
  66%,
  100% {
    background-position: -100% center;
    opacity: 0;
  }
}

@keyframes twx-mobile-skid {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-14px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(2px);
  }
  100% {
    transform: translateX(0);
  }
}

@media (max-width: 767px) {
  .brands-nav__btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .twx-skid-active {
    animation: twx-mobile-skid 0.4s ease-out forwards !important;
  }
}

@property --btn-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@media (min-width: 768px) {
  .brands-nav.browse-brands {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    box-sizing: border-box;
  }
}

.brands-card-add path {
  fill: #c2934a !important;
  transition: stroke 0.2s ease;
}

.brands-card-add.add-to-quote-btn {
  background-color: #282828 !important;
  color: #282828 !important;
}

.brands-card-add svg {
  transition: transform 0.2s ease;
}

.brands-card-add:hover svg {
  transform: scale(1.2);
}

.featured-slide__quote-btn:hover,
.featured-slide__quote-btn:hover * {
  transform: scale(1.04);
}

.featured-slide__cta:hover,
.featured-slide__cta:hover * {
  transform: scale(1.04);
}
