/* Urban Plants storefront theme, loaded after Oscar's own styles.css
 * (Bootstrap 4.6) so everything here overrides it. Colours and fonts come
 * from the brand manual (Manual de marca) via diseños/directivas_diseño.md;
 * change them here, in the variables, and nowhere else. */

@font-face {
    font-family: "Poppins";
    font-weight: 100;
    font-style: normal;
    font-display: swap;
    src: url("../fonts/Poppins-Thin.ttf") format("truetype");
}
@font-face {
    font-family: "Poppins";
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: url("../fonts/Poppins-Regular.ttf") format("truetype");
}
@font-face {
    font-family: "Poppins";
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    src: url("../fonts/Poppins-Medium.ttf") format("truetype");
}
@font-face {
    font-family: "Poppins";
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url("../fonts/Poppins-Bold.ttf") format("truetype");
}

:root {
    --up-green-dark: #043218;
    --up-sand: #ebe6e0;
    --up-green: #58a054;
    /* Derived, not in the manual: sand shades for cards/borders, and a
     * darker light-green for text/links on sand (#58a054 on #ebe6e0 is only
     * about 2.5:1, too low for small text). */
    --up-sand-light: #f5f2ee;
    --up-sand-dark: #d9d2c8;
    --up-green-text: #2f6b2c;

    --up-font-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    --up-font-heading: var(--up-font-body);
    --up-radius: 18px;
    --up-header-height: 72px;
}

html { scroll-behavior: smooth; }

/* Sticky footer: the page is a full-height column and the footer's auto top
 * margin takes up whatever space the content leaves, so a short page still
 * ends with the footer at the bottom of the window. The space between content
 * and footer is padding on the content wrappers (.page, .up-wrap). */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--up-sand);
    color: var(--up-green-dark);
    font-family: var(--up-font-body);
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--up-font-heading); color: var(--up-green-dark); }

a { color: var(--up-green-text); }
a:hover { color: var(--up-green-dark); }

/* Section titles in the mockups: uppercase, bold, letter-spaced. */
.up-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 1rem;
}

/* ---- Buttons ------------------------------------------------------- */
.btn { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 12px; }
.btn-primary, .btn-success {
    background: var(--up-green);
    border-color: var(--up-green);
    color: var(--up-green-dark);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-success:hover, .btn-success:focus, .btn-success:active {
    background: var(--up-green-dark);
    border-color: var(--up-green-dark);
    color: var(--up-sand);
}
.btn-secondary, .btn-outline-secondary {
    background: transparent;
    border-color: var(--up-green-dark);
    color: var(--up-green-dark);
}
.btn-secondary:hover, .btn-outline-secondary:hover {
    background: var(--up-green-dark);
    color: var(--up-sand);
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid var(--up-green);
    outline-offset: 2px;
}

/* ---- Announcement bar --------------------------------------------- */
.up-announcement {
    background: var(--up-green-dark);
    color: var(--up-sand);
    text-align: center;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .5rem 1rem;
}

/* ---- Header --------------------------------------------------------- */
.up-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--up-sand);
}
.up-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 2rem;
    max-width: 1320px;
    margin: 0 auto;
    padding: .75rem 1.5rem;
    min-height: var(--up-header-height);
}
.up-logo img { display: block; height: 38px; width: auto; }
.up-nav { flex: 1 1 auto; }
.up-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.up-nav a {
    display: inline-block;
    padding: .35rem 0;
    color: var(--up-green-dark);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.up-nav a:hover, .up-nav a[aria-current="page"] { border-bottom-color: var(--up-green); }

.up-tools { display: flex; align-items: center; gap: .25rem; }
.up-tool {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--up-green-dark);
    cursor: pointer;
}
.up-tool:hover { background: var(--up-sand-dark); color: var(--up-green-dark); }
.up-tool svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.up-tool--user { background: var(--up-green-dark); color: var(--up-sand); }
.up-tool--user:hover { background: var(--up-green); color: var(--up-green-dark); }
.up-badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--up-green);
    color: var(--up-green-dark);
    font-size: .65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.up-menu-toggle { display: none; }

.up-search { display: none; border-top: 1px solid var(--up-sand-dark); background: var(--up-sand); }
.up-search.is-open { display: block; }
.up-search form { display: flex; gap: .5rem; max-width: 1320px; margin: 0 auto; padding: .75rem 1.5rem; }
.up-search input { flex: 1; border: 1px solid var(--up-green-dark); border-radius: 12px; background: var(--up-sand-light); padding: .5rem 1rem; color: var(--up-green-dark); }

.up-header .dropdown-menu { background: var(--up-sand-light); border: 1px solid var(--up-sand-dark); border-radius: 12px; }
.up-header .dropdown-item { color: var(--up-green-dark); font-size: .85rem; }
.up-header .dropdown-item:hover { background: var(--up-sand); }

/* Tablet: logo and icons on the first row, menu on the second. */
@media (max-width: 991.98px) {
    .up-header__inner { gap: .25rem 1rem; }
    .up-logo { order: 1; margin-right: auto; }
    .up-tools { order: 2; }
    .up-nav { order: 3; flex-basis: 100%; border-top: 1px solid var(--up-sand-dark); }
    .up-nav ul { justify-content: center; padding-top: .35rem; }
}
/* Phone: hamburger replaces the second row. */
@media (max-width: 575.98px) {
    .up-header__inner { padding: .5rem 1rem; }
    .up-logo img { height: 30px; }
    .up-menu-toggle { display: inline-flex; }
    .up-nav.collapse:not(.show) { display: none; }
    .up-nav ul { flex-direction: column; align-items: flex-start; gap: 0; }
    .up-nav a { padding: .6rem 0; }
}
@media (min-width: 576px) {
    .up-nav.collapse { display: block !important; }
}

/* ---- Page content (Oscar pages that have no mockup yet) ------------ */
.page { background: transparent; padding-bottom: 4rem; }
.breadcrumb { background: transparent; padding-left: 0; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.breadcrumb a { color: var(--up-green-dark); }
.card, .well { background: var(--up-sand-light); border-color: var(--up-sand-dark); border-radius: var(--up-radius); }

/* ---- Footer --------------------------------------------------------- */
.up-footer {
    margin-top: auto;
    padding: 3rem 1.5rem 2.5rem;
    background: var(--up-green-dark);
    color: var(--up-sand);
    border-radius: 28px 28px 0 0;
}
.up-footer__inner { display: grid; gap: 2rem; grid-template-columns: 1fr; max-width: 1320px; margin: 0 auto; }
@media (min-width: 768px) { .up-footer__inner { grid-template-columns: 1.2fr 1fr 1fr; } }
.up-footer img { height: 34px; width: auto; }
.up-footer h2 { color: var(--up-sand); font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.up-footer ul { margin: 0; padding: 0; list-style: none; }
.up-footer li { margin-bottom: .5rem; }
.up-footer a { color: var(--up-sand); font-size: .85rem; font-weight: 500; letter-spacing: .04em; text-decoration: none; }
.up-footer a:hover { color: var(--up-green); text-decoration: underline; }
.up-footer__legal { grid-column: 1 / -1; font-size: .75rem; opacity: .8; }

/* Floating WhatsApp button: fixed bottom-right, kept clear of the content
 * flow so it never covers a page's own "add to basket" bar. */
.up-whatsapp {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1020;
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--up-green-dark);
    color: var(--up-green);
    box-shadow: 0 4px 14px rgba(4, 50, 24, .35);
}
.up-whatsapp:hover { background: var(--up-green); color: var(--up-green-dark); }
.up-whatsapp svg { width: 32px; height: 32px; fill: currentColor; }

.up-skip { position: absolute; left: -9999px; }
.up-skip:focus { left: 1rem; top: 1rem; z-index: 2000; background: var(--up-sand); padding: .5rem 1rem; }

/* ---- Rich content (product description, blog posts, flatpages) ------
 * Editors paste images and tables with fixed pixel sizes; they must never
 * be wider than the column they sit in. height:auto overrides the width/
 * height attributes TinyMCE writes, so the aspect ratio stays right. */
.page img, .page video, .page iframe { max-width: 100% !important; height: auto !important; }
.page iframe { aspect-ratio: 16 / 9; }
.page table { max-width: 100%; }
/* A table pasted into rich text (no Bootstrap "table" class) scrolls inside
 * its own box instead of widening the page. The HTML parser moves a table out
 * of the <p> the description sits in, so match it by class, not position. */
.page .content table:not(.table) {
    display: block;
    overflow-x: auto;
    width: auto !important;
}
.page .content p, .page .blog-post-body { overflow-wrap: anywhere; }

/* ---- Home ----------------------------------------------------------- */
.up-wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 1.5rem 3rem; }
.up-section { margin-top: 2.5rem; }
.up-section > h2 { margin-bottom: 1.25rem; }

.up-hero { position: relative; }
.up-hero__text { padding: 2rem 1.5rem 1.5rem; text-align: center; }
.up-hero__title {
    margin: 0;
    font-weight: 100;
    font-size: clamp(1.9rem, 5vw, 3.4rem);
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
}
.up-hero__cta { margin-top: 1.25rem; }
.up-hero__image { display: block; width: 100%; height: clamp(220px, 36vw, 484px); object-fit: cover; object-position: center; }
@media (min-width: 992px) {
    .up-hero__text { position: absolute; top: 2rem; right: max(1.5rem, calc((100vw - 1320px) / 2 + 1.5rem)); z-index: 1; padding: 0; text-align: right; max-width: 40%; }
}

.up-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .up-tiles { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }
.up-tile { display: block; color: var(--up-green-dark); text-align: center; text-decoration: none; }
.up-tile__media {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--up-radius);
    background: var(--up-sand-dark);
}
.up-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.up-tile:hover .up-tile__media img, .up-tile:focus-visible .up-tile__media img { transform: scale(1.04); }
.up-tile__name { display: block; margin-top: .75rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.up-tile:hover .up-tile__name { text-decoration: underline; text-decoration-color: var(--up-green); text-underline-offset: 4px; }

.up-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .up-products { grid-template-columns: repeat(4, 1fr); gap: 2rem 1.5rem; } }

.up-card { position: relative; text-align: center; }
.up-card__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--up-radius); background: var(--up-sand-light); }
.up-card__media > a { display: block; height: 100%; }
.up-card__media img { width: 100%; height: 100%; object-fit: cover; }
.up-card__wish { position: absolute; top: .5rem; right: .5rem; margin: 0; }
.up-card__wish button, .up-card__wish a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--up-green-dark); cursor: pointer;
}
.up-card__wish button:hover, .up-card__wish a:hover { background: rgba(235, 230, 224, .85); }
.up-card__wish svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.up-card__add { position: absolute; left: 50%; bottom: .75rem; margin: 0; transform: translateX(-50%); white-space: nowrap; }
.up-card__add .btn { padding: .35rem 1.5rem; font-size: .75rem; }
.up-card__add p { display: none; }
/* Pointer devices: the add button appears on hover or keyboard focus; touch
 * screens (no hover) always show it. */
@media (hover: hover) {
    .up-card__add { opacity: 0; transition: opacity .2s; }
    .up-card:hover .up-card__add, .up-card:focus-within .up-card__add { opacity: 1; }
}
.up-card__name { display: block; margin-top: .75rem; color: var(--up-green-dark); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.up-card__name:hover { text-decoration: underline; text-decoration-color: var(--up-green); text-underline-offset: 4px; }
.up-card__price { margin: .15rem 0 0; font-size: .85rem; font-weight: 500; }
.up-card__price p { margin: 0; }
.up-card__price .availability { display: none; }
.up-card__price .price_color { color: var(--up-green-dark); }
.up-stars { display: inline-block; margin-top: .15rem; font-size: .9rem; letter-spacing: .15em; line-height: 1; color: var(--up-green-dark); }
.up-stars::before {
    content: "★★★★★";
    background: linear-gradient(90deg, currentColor calc(var(--rating) / 5 * 100%), rgba(4, 50, 24, .25) 0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---- Breadcrumb, images, product page ------------------------------- */
.breadcrumb-item + .breadcrumb-item::before { content: ">"; color: var(--up-green-dark); font-weight: 700; }
.breadcrumb-item.active { color: var(--up-green-dark); }

/* No grey frame around images anywhere (Bootstrap's .img-thumbnail), as in
 * the mockups; images get the rounded corners instead. */
.img-thumbnail { padding: 0; background: transparent; border: 0; border-radius: var(--up-radius); }
.page .img-thumbnail img, .product_pod img { border-radius: var(--up-radius); }

/* Oscar's own CSS fixes every gallery slide at 400px tall (and its image at
 * max-height 400px) behind an #id selector; the #product_gallery prefix below
 * is there to out-rank those rules. */
/* The viewer is a box of fixed shape (square, but never taller than 80% of
 * the window), and every photo is fitted inside it whole: a portrait photo
 * gets side bands, a landscape one top/bottom bands, and the box never grows
 * to the photo, so the thumbnails below stay in view on any screen. */
#product_gallery.up-gallery .up-gallery__main {
    position: relative;
    aspect-ratio: 1 / 1;
    max-height: min(80vh, 720px);
    overflow: hidden;
    border-radius: var(--up-radius);
    background: var(--up-sand-light);
}
#product_gallery.up-gallery .carousel-inner,
#product_gallery.up-gallery .carousel-inner > .carousel-item { height: 100%; line-height: normal; text-align: center; }
#product_gallery.up-gallery .carousel-inner > .carousel-item > img {
    display: block;
    width: 100%;
    height: 100% !important;
    max-height: none;
    object-fit: contain;
}
#product_gallery.up-gallery .carousel-indicators {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: flex-start;
    width: auto;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}
#product_gallery.up-gallery .carousel-indicators li {
    float: none;
    flex: none;
    box-sizing: border-box;
    width: 72px;
    height: 72px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--up-sand-light);
    text-indent: 0;
    opacity: .75;
    cursor: pointer;
}
#product_gallery.up-gallery .carousel-indicators li img { display: block; width: 100%; height: 100%; object-fit: cover; }
#product_gallery.up-gallery .carousel-indicators li:hover { opacity: 1; }
#product_gallery.up-gallery .carousel-indicators li.active { opacity: 1; border-color: var(--up-green-dark); background: var(--up-sand-light); }

/* Variants as a row of buttons: dark, the current one light green. */
.up-variants { margin: 1rem 0 1.25rem; }
.up-variants__label { margin: 0 0 .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.up-variants__list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.up-variant {
    display: inline-block;
    min-width: 48px;
    padding: .45rem 1.1rem;
    border-radius: 10px;
    background: var(--up-green-dark);
    color: var(--up-sand);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}
.up-variant:hover { background: var(--up-green); color: var(--up-green-dark); text-decoration: none; }
.up-variant.is-current { background: var(--up-green); color: var(--up-green-dark); }

/* ---- Modal ---------------------------------------------------------- */
.up-modal .modal-content { background: var(--up-sand); border: 0; border-radius: var(--up-radius); color: var(--up-green-dark); }
.up-modal .modal-header, .up-modal .modal-footer { border: 0; }
.up-modal .modal-title { margin: 0; }
.up-modal .close { color: var(--up-green-dark); opacity: .8; }
.up-modal .form-control { border: 1px solid var(--up-green-dark); border-radius: 12px; background: var(--up-sand-light); }
.modal-backdrop { background: var(--up-green-dark); }
.modal-backdrop.show { opacity: .6; }

/* Add to basket: quantity stepper and button on one line */
.up-buy { display: flex; align-items: stretch; gap: .75rem; margin-top: 1rem; }
.up-qty { display: flex; align-items: center; flex: 0 0 auto; border: 1px solid var(--up-green-dark); border-radius: .75rem; overflow: hidden; background: transparent; }
.up-qty input { width: 3rem; border: 0; background: transparent; text-align: center; font-weight: 700; color: var(--up-green-dark); padding: 0; -moz-appearance: textfield; box-shadow: none; }
.up-qty input::-webkit-outer-spin-button, .up-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.up-qty__btn { border: 0; background: transparent; color: var(--up-green-dark); font-size: 1.1rem; font-weight: 700; width: 2.5rem; align-self: stretch; cursor: pointer; }
.up-buy__add { flex: 1 1 auto; width: auto; }

/* Round logo over the hero photo, half hanging onto the next section */
.up-hero { margin-bottom: clamp(45px, 6vw, 75px); }
.up-hero__badge { position: absolute; left: 50%; bottom: 0; z-index: 2; width: clamp(90px, 12vw, 150px); height: auto; transform: translate(-50%, 50%); }

/* Oscar fixes the form at 220px wide and inline; the buy row needs the full column */
#add_to_basket_form.add-to-basket { display: block; width: 100%; margin-right: 0; }
.up-buy__add { white-space: nowrap; }
.up-qty input { flex: 0 0 3rem; min-width: 3rem; height: auto; }

/* Same height for stepper and button, as in the design */
.up-buy { --up-buy-h: 3.25rem; align-items: center; }
.up-qty { height: var(--up-buy-h); box-sizing: border-box; border-radius: .9rem; }
.up-qty input { height: 100%; line-height: 1; margin: 0; }
.up-qty__btn { height: 100%; padding: 0; line-height: 1; }
.up-buy__add { height: var(--up-buy-h); padding-top: 0; padding-bottom: 0; margin: 0; border-radius: .9rem; display: flex; align-items: center; justify-content: center; }
#add_to_basket_form .up-buy .btn { margin-bottom: 0; }

/* Error pages (400/403/404) */
.up-error { text-align: center; max-width: 40rem; margin: 3rem auto 0; }
.up-error__logo { width: 120px; height: auto; }
.up-error__code { margin: 1rem 0 0; font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 700; line-height: 1; color: var(--up-green-dark); }
.up-error__title { margin: .5rem 0 1rem; }
.up-error__actions { margin-top: 1.75rem; }
.up-error__actions .btn { margin: .25rem; }
