/* Rivo's overrides on the Porto demo-1 theme. The theme's own files (bootstrap.min.css,
   style.min.css) are synced copies: change Rivo's look here, never there. */

/* ---------- Generic helpers ---------- */

.rivo-reset-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.rivo-reset-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.rivo-link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.rivo-inline-form {
  display: inline;
  margin: 0;
}

.rivo-muted {
  color: #777;
}

/* Seller-written text: shown as typed, never as HTML. */
.rivo-plain-text {
  white-space: pre-line;
}

.rivo-modal {
  display: block;
  overflow-y: auto;
}

.rivo-empty,
.rivo-message-page {
  padding: 6rem 1rem;
  text-align: center;
}

.rivo-message-page h1 {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
}

.rivo-message-actions .btn + .btn {
  margin-left: 1rem;
}

/* ---------- Header ---------- */

/* The theme only sizes the logo once the header sticks (max-height: 32px), leaving it at its
   intrinsic size otherwise. The Posra lockup is a wide 4.25:1, so pin its height here and let
   the width follow; the theme's stickier selector still wins on scroll. */
.logo img {
  height: 44px;
  width: auto;
}

/* The account links sit where demo-1 had DAILY DEAL, MY WISHLIST and LOG IN. */
.header-menu .rivo-header-user {
  display: flex;
  align-items: center;
  padding: 16px 35px;
  color: #000;
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-menu ul a {
  text-transform: uppercase;
}

.dropdown-expanded .header-menu .rivo-header-user {
  padding: 1.9rem 0;
  color: #fff;
}

/* Below the desktop menu the account links live in the mobile menu, so the header drops them
   instead of crowding the menu button. */
@media screen and (max-width: 991px) {
  .header-dropdown.dropdown-expanded {
    display: none;
  }
}

.rivo-cart-dropdown-note {
  margin-bottom: 2rem;
  color: #000;
  font-size: 1.3rem;
}

/* ---------- Sign-in ---------- */

.rivo-social-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 320px;
}

.rivo-social-buttons .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.2rem 2rem;
  border-radius: 4px;
  font-family: 'Open Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* Google's button guidelines: a white button with a grey border and the multicolour G. */
.rivo-social-buttons .rivo-btn-google {
  border: 1px solid #747775;
  background-color: #fff;
  color: #1f1f1f;
}

.rivo-social-buttons .rivo-btn-google:hover,
.rivo-social-buttons .rivo-btn-google:focus {
  background-color: #f2f2f2;
  color: #1f1f1f;
}

.rivo-social-buttons .rivo-btn-facebook {
  border: 1px solid #1877f2;
  background-color: #1877f2;
  color: #fff;
}

.rivo-social-buttons .rivo-btn-facebook:hover,
.rivo-social-buttons .rivo-btn-facebook:focus {
  background-color: #166fe5;
  color: #fff;
}

.rivo-social-buttons .icon-facebook::before {
  margin: 0;
}

/* The home slider's .btn rules would otherwise restyle the sign-in buttons. */
.home-slider .rivo-social-buttons .btn {
  padding: 1.2rem 2rem;
  font: 600 1.4rem/1.5 'Open Sans', sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

.home-slider .rivo-social-buttons .rivo-btn-google {
  border-color: #747775;
  background-color: #fff;
  color: #1f1f1f;
}

.home-slider .rivo-social-buttons .rivo-btn-facebook {
  border-color: #1877f2;
  background-color: #1877f2;
}

/* On narrow screens the banners' art, drawn on the right, ends up behind the heading: lean the
   crop right and set the text on a light panel. */
@media screen and (max-width: 767px) {
  .home-slide .slide-bg {
    background-position: 80% center;
  }

  .home-slide-content {
    right: 5%;
    left: 5%;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
  }
}

/* The theme's 8rem and 10rem headings would run into the banners' art; these stop short of it. */
@media screen and (min-width: 768px) {
  .home-slider h1 {
    font-size: 5.6rem;
  }
}

@media screen and (min-width: 1200px) {
  .home-slider h1 {
    font-size: 7.2rem;
  }
}

.rivo-slide-actions:not(.rivo-social-buttons) .btn + .btn {
  margin-left: 1rem;
}

.rivo-home-alert {
  position: absolute;
  top: 140px;
  left: 50%;
  z-index: 20;
  width: min(90%, 560px);
  transform: translateX(-50%);
  text-align: center;
}

/* ---------- Product listing ---------- */

/* The category banner's place, without its image: the search is the banner. */
.rivo-search-hero {
  min-height: 300px;
  margin-bottom: 0;
  background: linear-gradient(135deg, #f4f4f4 0%, #e3e3e3 100%);
}

.rivo-search-hero h1 {
  margin-bottom: 2rem;
  color: #000;
}

.rivo-search-form {
  display: flex;
  width: min(90%, 760px);
  margin: 0 auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.rivo-search-form .form-control {
  flex: 1;
  max-width: none;
  height: 56px;
  margin: 0;
  padding: 0 2rem;
  border: 0;
  font-family: 'Open Sans', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0;
  text-transform: none;
}

/* The theme sets placeholders in uppercase Oswald. */
.rivo-search-form .form-control::placeholder {
  color: #888;
  font-family: 'Open Sans', sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

@media screen and (max-width: 575px) {
  .rivo-search-hero {
    min-height: 240px;
  }

  .rivo-search-hero h1 {
    font-size: 3.2rem;
  }

  .rivo-search-form .btn {
    padding: 0 1.4rem;
  }
}

.rivo-search-form .btn {
  height: 56px;
  padding: 0 2.6rem;
  border-radius: 0;
  font-size: 1.4rem;
}

.rivo-search-summary {
  margin: 1.5rem 0 0;
  color: #000;
  font-size: 1.4rem;
  font-weight: 600;
}

.rivo-toolbox-count {
  margin-left: 1rem;
  font-size: 1.3rem;
}

.cat-list li.active > a {
  color: #000;
  font-weight: 700;
}

.rivo-price-inputs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.rivo-price-inputs .form-control,
.rivo-tag-filter .form-control {
  margin-bottom: 0;
}

.rivo-tag-filter {
  display: flex;
  gap: 0.6rem;
}

.rivo-price-prefix {
  font-size: 0.8em;
  font-weight: 400;
}

/* The badges across the top of a card's image. The theme pins each label to a corner of its own, which
   overlaps once there are three: at the narrowest card (162.5px, two per row on a phone) they want
   ~190px of the 146.5px between the insets. In this row they flow instead, sharing a line where there
   is room and wrapping together where there isn't. Bounding it left AND right is what lets it wrap. */
.rivo-card-labels {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  left: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  z-index: 1;
}

.rivo-card-labels .product-label {
  position: static;
}

/* The saving keeps to the right of whichever line it lands on. */
.rivo-card-labels .label-sale {
  margin-left: auto;
}

/* The product page's two condition tags. The adjacency is reversed here: a NEW product is always
   FIXED_PRICE, so the green sits beside the black sale label, and the grey USED beside the green
   Make Offer — green never doubles up either way. */
.rivo-card-labels .rivo-condition-new {
  background-color: #62b959;
}

.rivo-card-labels .rivo-condition-used {
  background-color: #777;
}

/* Under the top row of labels. */
.rivo-stock-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.6rem;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  z-index: 1;
}

/* The live window's countdown takes the stock bar's slot, in the Make Offer green rather than the stock
   bar's grey: it means "this sale is running", not "this is unavailable". */
.rivo-stock-label.rivo-window-label {
  background-color: rgba(98, 185, 89, 0.85);
}

/* A sold product stays in discovery, dimmed. Never the figure: the Sold bar is its child and must stay
   legible, so only the image and the details below it are faded. */
.rivo-product-sold .product-image img {
  opacity: 0.5;
  filter: grayscale(0.7);
}

.rivo-product-sold .product-details {
  opacity: 0.65;
}

/* ---------- Product page ---------- */

/* Before Owl starts (or without JS), show the first image rather than nothing. */
.product-single-carousel.owl-carousel:not(.owl-loaded) {
  display: block;
}

.product-single-carousel.owl-carousel:not(.owl-loaded) > .product-item:not(:first-child) {
  display: none;
}

.rivo-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.rivo-product-meta li {
  padding: 0.3rem 0.9rem;
  border: 1px solid #ddd;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
}

.rivo-product-meta .rivo-sale-offer {
  border-color: #62b959;
  background-color: #62b959;
  color: #fff;
}

.rivo-product-meta .rivo-sale-fixed {
  border-color: #000;
  background-color: #000;
  color: #fff;
}

/* The condition reads as a tag rather than a faint outline: on a marketplace of used goods it is among
   the first things a buyer looks for. NEW takes the green safely — by the pricing invariant a NEW
   product is always FIXED_PRICE, so it never sits beside the green Make Offer chip. */
.rivo-product-meta .rivo-condition-new {
  border-color: #62b959;
  background-color: #62b959;
  color: #fff;
}

.rivo-product-meta .rivo-condition-used {
  border-color: #777;
  background-color: #777;
  color: #fff;
}

.rivo-saving {
  margin-top: -1rem;
  color: #62b959;
  font-weight: 600;
}

.rivo-purchase .product-action {
  margin-bottom: 1.5rem;
}

.rivo-purchase .add-cart {
  margin-left: 1rem;
  border: 0;
  cursor: pointer;
}

.rivo-purchase .add-cart:disabled,
.rivo-buy-now:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.rivo-buy-now {
  min-width: 200px;
  margin-bottom: 1.5rem;
}

.rivo-form-hint {
  color: #b33;
  font-size: 1.3rem;
}

.rivo-gate ol {
  margin: 0.8rem 0;
  padding-left: 2rem;
}

.rivo-offer-panel {
  margin-top: 1rem;
  padding: 2rem;
  border: 1px solid #e7e7e7;
  background-color: #fafafa;
}

.rivo-offer-title {
  margin-bottom: 1.5rem;
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem;
  text-transform: uppercase;
}

.rivo-offer-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

.rivo-offer-stats dt {
  color: #777;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
}

.rivo-offer-stats dd {
  margin: 0;
  color: #000;
  font-size: 1.5rem;
  font-weight: 600;
}

.rivo-countdown {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rivo-offer-form label {
  font-weight: 600;
}

.rivo-offer-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.rivo-offer-row .input-group {
  flex: 1;
}

.rivo-offer-row .form-control {
  margin-bottom: 0;
}

.rivo-confirm .btn {
  margin-right: 0.6rem;
}

.rivo-order-placed small {
  color: #555;
}

.rivo-details-table th {
  width: 35%;
  font-weight: 600;
}

.rivo-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 0;
  list-style: none;
}

.rivo-tag-list a {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid #ddd;
  color: #000;
}

/* The theme's sidebar toggle is a div; ours is a button with the same look. */
button.sidebar-toggle {
  color: inherit;
}

/* ---------- Ads ---------- */

.rivo-ad img,
.rivo-ad video {
  display: block;
  width: 100%;
}

.rivo-ad-caption {
  margin-top: 0.8rem;
  font-size: 1.3rem;
}

.rivo-ad-caption p {
  margin: 0.4rem 0 0;
  color: #555;
}

.rivo-ad-badge {
  margin-right: 0.6rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid #999;
  color: #777;
  font-size: 1rem;
  text-transform: uppercase;
}

/* ---------- Cart ---------- */

.rivo-line-problem {
  color: #b33;
  font-size: 1.3rem;
}

.rivo-summary-note {
  font-size: 1.2rem;
}

.rivo-checkout-results {
  margin-bottom: 2rem;
}

.table-cart .btn-remove {
  color: inherit;
}

/* ---------- Footer ---------- */

.rivo-footer-about {
  max-width: 420px;
}

/* ---------- My Account ---------- */

.rivo-gate a {
  color: inherit;
  text-decoration: underline;
}

.rivo-gate .rivo-gate-account {
  font-weight: 700;
}

.rivo-checklist {
  margin-bottom: 2rem;
}

.rivo-step {
  height: calc(100% - 2rem);
}

.rivo-step .card-header,
.rivo-id-card .card-header {
  display: flex;
  align-items: center;
}

/* The theme's clearfix ::after would be a flex item too; auto margin pushes the badge right anyway. */
.rivo-step-badge {
  margin-left: auto;
  padding: 0.2rem 0.8rem;
  border-radius: 1rem;
  background-color: #eee;
  color: #555;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
}

.rivo-step-done .rivo-step-badge,
.rivo-id-card .rivo-step-badge {
  background-color: #62b959;
  color: #fff;
}

.rivo-step-waiting .rivo-step-badge {
  background-color: #ffd166;
  color: #1d1d1b;
}

.rivo-step-todo {
  border-color: #e27c7c;
}

.rivo-step .btn {
  text-decoration: none;
}

.rivo-account-form {
  max-width: 640px;
}

.rivo-account-form .form-control {
  max-width: none;
}

.rivo-otp-input {
  max-width: 220px !important;
  font-size: 2rem;
  letter-spacing: 0.4em;
}

.rivo-country-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.rivo-country-input {
  max-width: 90px !important;
  margin-bottom: 0;
  text-transform: uppercase;
}

.rivo-form-links {
  display: flex;
  gap: 2rem;
}

.rivo-form-links .rivo-link-button:disabled {
  color: #999;
  cursor: default;
  text-decoration: none;
}

.rivo-id-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  margin-bottom: 1.5rem;
  border: 1px dashed #ccc;
  background-color: #fafafa;
}

.rivo-id-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* My Orders: the history table and its per-row cancel. */

/* The row carries the theme's `toolbox` class, which is what gives the status box the same metrics as
   the /products sort box. Its own spacing isn't wanted: a dashboard column is tighter than a
   category page, and the theme adds a top margin to a toolbox from 992px up. */
.rivo-orders-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* The theme clears a toolbox's floats with ::after, which in a flex row is an item of its own — and
   the `gap` before it would hold the panel link off the right edge. */
.rivo-orders-filter::after {
  content: none;
}

/* Out at the right edge, sized to the 34px select beside it: 18px line + 14px padding + 2px border.
   `.btn` doesn't reset the underline Porto puts on every hovered anchor, and it takes two classes to
   outrank that `a:hover` — the same reason the seller card scopes its own button. */
.rivo-orders-filter .rivo-orders-panel-link {
  margin-left: auto;
  padding: 0.7rem 1.6rem;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.rivo-orders-table td {
  vertical-align: middle;
}

.rivo-orders-table .rivo-order-actions {
  text-align: right;
  white-space: nowrap;
}

/* The reason box follows .form-control's 480px cap, but a table cell is narrower. */
.rivo-order-cancel textarea.form-control {
  max-width: 100%;
  margin-bottom: 0.5rem;
}

/* Selling on Rivo: the seller panel is another app, so the card only links out. */
.rivo-seller-card {
  margin-bottom: 2rem;
}

.rivo-seller-card .rivo-shop-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.rivo-seller-card .rivo-shop-list li + li {
  margin-top: 1rem;
}

.rivo-seller-card .rivo-shop-status {
  text-transform: uppercase;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Porto underlines anchors inside a card, and these are buttons and rows of their own. */
.rivo-seller-card .btn,
.rivo-seller-card .rivo-my-products a {
  text-decoration: none;
}

/* The card's two ways into the panel, side by side, stacking rather than overflowing on a phone. */
.rivo-seller-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* The seller's own latest products, each a row into the panel. */
.rivo-my-products-title {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.rivo-seller-card .rivo-my-products {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.rivo-seller-card .rivo-my-products a {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.8rem 0;
  border-top: 1px solid #efefef;
  color: #000;
}

.rivo-seller-card .rivo-my-products a:hover {
  background-color: #fafafa;
}

.rivo-seller-card .rivo-my-products img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  background-color: #f4f4f4;
}

.rivo-my-product-info {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 1.2rem;
}

/* The name takes what the fixed columns leave, and keeps one line however long it is. */
.rivo-my-product-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rivo-product-status {
  flex: 0 0 auto;
  text-transform: uppercase;
  font-size: 1.1rem;
  font-weight: 700;
}

/* A status no buyer sees: the seller's own draft or a listing they took down. */
.rivo-product-status.rivo-status-hidden {
  color: #999;
}

.rivo-my-product-price {
  flex: 0 0 auto;
  min-width: 90px;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* On a phone the three columns leave the name a few pixels, so it takes a line of its own and the
   status and price share the one below it. */
@media (max-width: 575px) {
  .rivo-my-product-info {
    flex-wrap: wrap;
    gap: 0.2rem 1.2rem;
  }

  .rivo-my-product-name {
    flex: 1 1 100%;
  }

  .rivo-my-product-price {
    margin-left: auto;
  }
}

/* The Sign out page's two ways out, side by side, stacking on a phone. */
.rivo-signout-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
