@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
    --font-ui: "Manrope", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --font-brand: "Dancing Script", cursive;

    --bg-main: radial-gradient(circle at 12% 18%, #f6f3f0 0%, #ebe5df 42%, #dfd7d0 100%);
    --bg-card: #f8f5f1;
    --bg-soft: #efe8e1;
    --border: #d8cfc7;

    --text-main: #322925;
    --text-soft: #695d56;
    --accent: #5f1c1c;
    --accent-soft: #835150;
    --ok: #196f3d;

    --shadow-1: 0 8px 20px rgba(32, 22, 18, 0.12);
    --shadow-2: 0 18px 40px rgba(32, 22, 18, 0.16);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;

    --content-width: 1240px;
    --section-title-size: clamp(1.1rem, 1.6vw, 1.62rem);
    --footer-height: clamp(48px, 5.2vh, 58px);
}

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

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

html {
    overflow-x: hidden;
    background: var(--bg-main);
}

body {
    display: flex;
    flex-direction: column;
    font-family: var(--font-ui);
    color: var(--text-main);
    background: var(--bg-main);
    overflow-x: hidden;
    padding-bottom: var(--footer-height);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

header {
    position: relative;
    min-height: clamp(170px, 26vh, 300px);
    overflow: hidden;
}

.main-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

header::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(30, 15, 15, 0.72), rgba(95, 28, 28, 0.5));
}

.navbar {
    position: absolute;
    top: clamp(10px, 1.8vw, 16px);
    left: 50%;
    transform: translateX(-50%);
    width: min(var(--content-width), calc(100% - 20px));
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    z-index: 4;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(22, 13, 13, 0.42);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
}

.logo-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: max-content;
    overflow: visible;
}

.logo {
    width: auto;
    height: clamp(32px, 3.7vw, 54px);
    max-width: none;
    margin-left: 0 !important;
    object-fit: contain;
}

nav {
    margin-right: 0;
    min-width: 0;
}

nav ul,
.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    color: #f8f2ef;
    font-weight: 700;
    font-size: clamp(0.72rem, 0.95vw, 0.92rem);
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

nav ul li a:hover,
nav ul li a.active {
    transform: translateY(-1px);
    background: rgba(199, 161, 161, 0.35);
}

.header-text {
    position: absolute;
    z-index: 3;
    left: max(18px, calc((100vw - var(--content-width)) / 2 + 10px));
    bottom: clamp(14px, 2vh, 24px);
    color: #fff;
}

.header-text h1 {
    margin: 0;
    font-family: var(--font-brand);
    font-size: clamp(1.52rem, 2.8vw, 2.5rem);
    line-height: 1.04;
    font-weight: 700;
}

.header-text .subtitle {
    margin: 6px 0 0;
    font-size: clamp(0.72rem, 0.95vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #f6efeb;
}

.social-icons {
    position: absolute;
    z-index: 4;
    right: max(18px, calc((100vw - var(--content-width)) / 2 + 10px));
    bottom: clamp(12px, 2vh, 20px);
    display: flex;
    align-items: center;
    gap: 9px;
    overflow: visible;
}

.social-icons a {
    width: clamp(28px, 2.2vw, 36px);
    height: clamp(28px, 2.2vw, 36px);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.9rem, 1.1vw, 1.12rem);
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.2s ease, background-color 0.2s ease;
    overflow: visible;
    line-height: 1;
}

.social-icons a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.34);
}

.tooltip-text-logo,
.tooltip-text,
.tooltip-text-supplies {
    visibility: hidden;
    opacity: 0;
    border-radius: 8px;
    border: 1px solid #e4dbd4;
    background: #fff;
    color: #5a2424;
    font-size: 0.74rem;
    line-height: 1.2;
    padding: 5px 8px;
    transition: opacity 0.2s ease;
}

.tooltip-text-logo {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 160px;
}

.logo-link:hover .tooltip-text-logo {
    visibility: visible;
    opacity: 1;
}

.notification-bar {
    position: relative;
    width: min(var(--content-width), calc(100% - 20px));
    margin: 0 auto;
    margin-top: clamp(8px, 1.4vw, 12px);
    border: 1px solid #d4c7bf;
    border-radius: 14px;
    background: linear-gradient(180deg, #b6a3ac, #aa969f);
    box-shadow: var(--shadow-1);
    color: #fff;
}

.notification-viewport {
    min-height: 54px;
    overflow: hidden;
}

.notification-track {
    display: flex;
    flex-direction: column;
}

.notification-text {
    margin: 0;
    padding: 10px 52px 10px 14px;
    color: #4f1d1d;
    font-weight: 700;
    font-size: clamp(0.76rem, 0.92vw, 0.9rem);
    line-height: 1.28;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 1.7rem;
    height: 1.7rem;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #4f1d1d;
    font-size: 1.35rem;
    cursor: pointer;
}

.notification-bar.hidden {
    display: none;
}

main {
    flex: 1;
    width: min(var(--content-width), calc(100% - 20px));
    margin: clamp(10px, 1.5vw, 16px) auto clamp(26px, 3.5vw, 42px);
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2.2vw, 22px);
}

footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #252225;
    color: #f7f2ef;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 40;
}

footer p {
    margin: 0;
    font-size: clamp(0.82rem, 0.95vw, 1rem);
}

.home-icon-wrapper,
.home-icon-wrapper-supplies {
    position: fixed;
    right: 38px !important;
    top: clamp(166px, 26.5vh, 288px);
    bottom: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #d9cec7;
    background: #fff;
    box-shadow: var(--shadow-1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 45;
    overflow: visible;
}

.home-icon,
.home-icon-supplies {
    color: #3d3531;
    font-size: 1.05rem;
    text-decoration: none;
}

.home-icon-wrapper:hover .tooltip-text,
.home-icon-wrapper-supplies:hover .tooltip-text-supplies {
    visibility: visible;
    opacity: 1;
}

.tooltip-text,
.tooltip-text-supplies {
    position: absolute;
    right: 108%;
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
}

/* Home access is integrated in the navbar; disable floating legacy button */
.home-icon-wrapper,
.home-icon-wrapper-supplies {
    display: none !important;
}

/* Home gallery */
.gallery {
    width: 100%;
}

.grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(12px, 1.5vw, 18px);
}

.image-container {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-1);
    background: #ddd;
    --corner: 72px;
    --tri-center-offset: -7%;
    --label-size: 0.8rem;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.image-container:hover img {
    transform: scale(1.04);
    filter: brightness(0.68);
}

.image-container::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    border-bottom: var(--corner) solid #2e7d32;
    border-left: var(--corner) solid transparent;
    z-index: 1;
}

.image-container.sold::before {
    border-bottom-color: #7a1111;
}

.image-container::after {
    content: "Available!";
    position: absolute;
    right: 0;
    bottom: 0;
    width: var(--corner);
    height: var(--corner);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--label-size);
    font-weight: 800;
    line-height: 1;
    transform: translate(calc(-1 * var(--tri-center-offset)), calc(-1 * var(--tri-center-offset))) rotate(-45deg);
    pointer-events: none;
}

.image-container.sold::after {
    content: "Sold!";
}

/* About */
.about-modern {
    width: 100%;
}

.about-wrapper {
    width: 100%;
}

.about-card {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(300px, 0.95fr) minmax(340px, 1.05fr);
    gap: clamp(14px, 1.8vw, 22px);
    align-items: stretch;
    padding: clamp(14px, 1.9vw, 24px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(165deg, #fbf9f6, #f0e8e2);
    box-shadow: var(--shadow-2);
    overflow: visible;
}

.about-media {
    width: 100%;
    height: clamp(230px, 34vh, 370px);
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
}

.about-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 10px;
}

.about-title {
    margin: 0;
    font-family: var(--font-ui);
    font-size: var(--section-title-size);
    font-weight: 800;
    line-height: 1.14;
    color: var(--accent);
}

.about-body {
    flex: 1;
    min-height: 0;
    max-height: min(54vh, 470px);
    overflow-y: auto;
    padding-right: 8px;
    color: var(--text-main);
    font-size: clamp(0.88rem, 1.02vw, 1rem);
    line-height: 1.58;
}

.about-signature {
    margin-top: auto;
    text-align: right;
    color: var(--text-soft);
}

.about-name {
    margin: 0;
    font-family: var(--font-brand);
    font-size: clamp(1.7rem, 2.4vw, 2.3rem);
    color: var(--accent);
}

.about-role {
    margin: 4px 0 0;
    font-weight: 800;
    font-size: clamp(0.92rem, 1.05vw, 1.22rem);
}

/* Contact */
.contact-page .about-card {
    grid-template-columns: 1fr;
}

.contact-page .contact-card,
.contact-page .about-card,
.contact-page .contact-section,
.contact-page .contact-grid,
.contact-page .icons-contact-wrapper,
.contact-page .contact-icon-box,
.contact-page .contact-icon-box i,
.contact-page .contact-icon-box p {
    overflow: visible !important;
}

.contact-page .contact-card {
    display: block;
}

.contact-page .contact-section {
    width: min(860px, 100%);
    margin: 0 auto !important;
    padding: 0 !important;
}

.contact-page .contact-grid {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 16px;
}

.contact-page .contact-text {
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid #cec2b9;
    background: linear-gradient(165deg, #e9e3de, #d8d0c9);
    color: #5f4f48;
    font-weight: 600;
    text-align: center;
}

.contact-page .icons-contact-wrapper {
    width: min(740px, 100%);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(10px, 1.4vw, 14px);
    padding: 4px;
}

.contact-page .contact-icon-box {
    position: relative;
    z-index: 1;
    width: clamp(104px, 8.8vw, 122px);
    height: clamp(104px, 8.8vw, 122px);
    border-radius: 16px;
    border: 1px solid #cfc4bc;
    background: #f8f4f1;
    box-shadow: var(--shadow-1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-page .contact-icon-box:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 30px rgba(47, 31, 24, 0.2);
    z-index: 5;
}

.contact-page .contact-icon-box a {
    color: inherit;
    text-decoration: none;
}

.contact-page .contact-icon-box i {
    font-size: clamp(1.85rem, 2.2vw, 2.5rem);
    line-height: 1;
}

.contact-page .contact-icon-box p {
    margin: 8px 0 0;
    font-size: clamp(0.86rem, 1vw, 0.98rem);
}

.contact-page .icon-mail {
    border: none;
    background: transparent;
    color: inherit;
    padding: 0;
    cursor: pointer;
}

.icon-mail i {
    color: #9278f3;
}

.icon-face i {
    color: #0866ff;
}

.icon-insta i {
    color: #fb2c79;
}

.icon-x i {
    color: #000;
}

.icon-wa i {
    color: #25d366;
}

/* How to buy */
.howtobuy-section {
    width: 100%;
}

.howtobuy-card {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
    gap: clamp(14px, 1.8vw, 22px);
    align-items: stretch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(165deg, #fbf9f6, #f0e8e2);
    box-shadow: var(--shadow-2);
    padding: clamp(14px, 1.9vw, 24px);
    height: clamp(440px, 62vh, 780px);
    overflow: hidden;
}

.howtobuy-nav {
    width: 100%;
    display: grid;
    gap: 10px;
    align-content: start;
}

.howtobuy-nav-item {
    min-height: 84px;
    border-radius: 14px;
    border: 1px solid #cdbeb4;
    background: #f8f4f1;
    color: #665852;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.howtobuy-nav-item:hover,
.howtobuy-nav-item.is-active {
    transform: translateY(-2px);
    border-color: #bca79c;
    background: #f1e8e2;
    color: var(--accent);
}

.howtobuy-nav-icon i {
    font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.howtobuy-nav-label {
    margin-top: 6px;
    font-size: clamp(0.78rem, 0.95vw, 0.9rem);
}

.howtobuy-content {
    min-width: 0;
    min-height: 0;
    display: flex;
}

.howtobuy-panel {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    border: 1px solid #cec1b8;
    border-radius: 14px;
    background: #ede6e0;
    overflow: hidden;
}

.howtobuy-scroll {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding: clamp(14px, 1.8vw, 22px);
    color: #4f453f;
    font-size: clamp(0.86rem, 0.96vw, 1rem);
    line-height: 1.56;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.howtobuy-title {
    margin: 0 0 10px;
    font-size: var(--section-title-size);
    font-weight: 800;
    line-height: 1.16;
    color: var(--accent);
}

.howtobuy-scroll p {
    margin: 0 0 12px;
}

.howtobuy-scroll a,
.howtobuy-paypal-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

/* Supplies */
body.drone-page {
    background: var(--bg-main);
}

.drone-page main {
    width: min(var(--content-width), calc(100% - 20px));
    margin: clamp(10px, 1.5vw, 16px) auto clamp(26px, 3.5vw, 42px);
}

.drone-reeds.drone-modern {
    width: 100%;
    padding: 0;
    margin: 0;
}

.drone-card {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(300px, 0.95fr) minmax(340px, 1.05fr);
    gap: clamp(14px, 1.8vw, 22px);
    align-items: stretch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(165deg, #fbf9f6, #f0e8e2);
    box-shadow: var(--shadow-2);
    padding: clamp(14px, 1.9vw, 24px);
    min-height: clamp(450px, 60vh, 760px);
    max-height: clamp(450px, 68vh, 820px);
}

.drone-col-left {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drone2-gallery {
    width: 100%;
    height: clamp(210px, 33vh, 340px);
}

.drone2-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-1);
    background: #d7d1ca center / cover no-repeat;
    cursor: zoom-in;
}

.drone2-frame::after {
    content: "+";
    position: absolute;
    right: 10px;
    top: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.drone2-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.drone2-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(25, 16, 16, 0.4);
    color: #fff;
    font-size: 1.9rem;
    cursor: pointer;
    z-index: 6;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.drone2-arrow.left {
    left: 10px;
}

.drone2-arrow.right {
    right: 10px;
}

.drone2-arrow:hover {
    background: rgba(95, 28, 28, 0.78);
}

.drone-purchase {
    border-radius: var(--radius-md);
    border: 1px solid #d6cabf;
    background: linear-gradient(165deg, #f7f2ed, #efe7e1);
    box-shadow: var(--shadow-1);
    padding: 12px 14px;
    display: grid;
    gap: 10px;
}

.drone-purchase .stock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 700;
}

.drone-purchase .stock input {
    width: 46px;
    text-align: center;
    border: 1px solid #ccbdb2;
    border-radius: 6px;
    background: #efebe7;
    color: var(--text-main);
    font-weight: 700;
    padding: 3px 4px;
}

.drone-purchase .prices {
    text-align: center;
    color: #5e524c;
    font-size: 0.94rem;
    line-height: 1.4;
}

.drone-purchase .price-main-line {
    margin: 0;
    font-weight: 700;
}

.drone-purchase .price-helper {
    margin: 4px 0 0;
    font-size: 0.83rem;
    color: #70645e;
}

.drone-purchase .price-highlight,
.usa-price-highlight {
    color: var(--ok);
    font-size: clamp(1.02rem, 1.4vw, 1.22rem);
    font-weight: 800;
}

.shipping-rates-open {
    margin: 8px auto 0;
    width: min(280px, 100%);
    padding: 0.48rem 0.65rem;
    border-radius: 10px;
    border: 1px solid #d4c4b7;
    background: #f8efe4;
    color: #5c4332;
    font-size: 0.88rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
}

.shipping-rates-open::after {
    content: "+";
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eadccf;
}

.purchase-button {
    display: flex;
    justify-content: center;
}

.button,
.pay-trigger {
    border: none;
    border-radius: 10px;
    padding: 0.56rem 1.05rem;
    min-width: 126px;
    text-decoration: none;
    background: #20699d;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(32, 105, 157, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.pay-trigger:hover {
    transform: translateY(-1px);
}

.button-disabled,
.pay-trigger.button-disabled,
.pay-trigger[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.drone-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drone-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--accent-soft);
}

.drone-title {
    margin: 0;
    font-size: var(--section-title-size);
    line-height: 1.14;
    font-weight: 800;
    color: var(--accent);
}

.drone-body {
    flex: 1;
    min-height: 0;
    max-height: min(52vh, 520px);
    overflow-y: auto;
    padding-right: 8px;
    font-size: clamp(0.86rem, 0.98vw, 1rem);
    line-height: 1.56;
    color: var(--text-main);
}

.drone-list {
    margin: 0;
    padding-left: 20px;
}

.drone-links {
    margin: 0;
    padding-left: 16px;
}

.drone-links a,
.drone-content a,
.how-to-buy-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.drone-links a:hover,
.drone-content a:hover,
.how-to-buy-link:hover {
    text-decoration: underline;
}

/* Modals used by supplies + contact */
#shipping-rates-overlay,
#pay-modal-overlay,
#region-confirm-overlay,
#stock-modal-overlay,
.contact-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1900;
    background: rgba(0, 0, 0, 0.56);
    display: none;
}

#shipping-rates-overlay.visible,
#pay-modal-overlay.visible,
#region-confirm-overlay.visible,
#stock-modal-overlay.visible,
.contact-modal-backdrop.visible {
    display: block;
}

#shipping-rates-modal,
#pay-modal,
#region-confirm,
#stock-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, 94vw);
    border-radius: 14px;
    border: 1px solid #d8c9be;
    border-top: 6px solid #a8979c;
    background: #f7f1eb;
    color: var(--text-main);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
    z-index: 1901;
    display: none;
}

#shipping-rates-modal.visible,
#pay-modal.visible,
#region-confirm.visible,
#stock-modal.visible {
    display: block;
}

#shipping-rates-modal {
    max-height: 86vh;
    overflow: hidden;
    padding: 14px 16px 12px;
}

.shipping-rates-modal-close,
.pay-modal-close,
.stock-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #5c4a42;
    font-size: 1.42rem;
    line-height: 1;
    cursor: pointer;
}

.shipping-rates-modal-title {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 1.2rem;
}

.shipping-rates-modal-subtitle {
    margin: 0 0 10px;
    color: #746560;
    font-size: 0.9rem;
}

.shipping-rates-modal-list {
    display: grid;
    gap: 6px;
    max-height: min(52vh, 360px);
    overflow-y: auto;
    padding-right: 4px;
}

.shipping-rate-row {
    display: grid;
    grid-template-columns: minmax(64px, 82px) minmax(0, 1fr) minmax(74px, 84px);
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid rgba(210, 196, 184, 0.6);
    padding: 4px 0;
}

.shipping-rate-zone {
    font-weight: 800;
    color: #5b4639;
}

.shipping-rate-service {
    color: #6f625b;
}

.shipping-rate-cost {
    justify-self: end;
    color: var(--ok);
    font-weight: 800;
}

.shipping-rates-modal-note {
    margin: 10px 0 0;
    color: #6f625b;
    font-size: 0.84rem;
}

#pay-modal {
    max-height: 90vh;
    overflow-y: auto;
    padding: 16px 16px 14px;
}

.pay-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: grid;
    gap: 8px;
}

.pay-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: #3f342f;
    font-weight: 700;
}

.pay-step .step-index {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.84rem;
    background: #8b5f48;
    color: #fff;
}

.pay-step.inactive {
    color: #8f8178;
    font-weight: 600;
}

.pay-step.inactive .step-index {
    background: #d7cbc4;
    color: #65564f;
}

.pay-zones {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

#pay-shipping-options {
    grid-template-columns: 1fr;
}

.zone-btn {
    border: 1px solid #d2c3b8;
    border-radius: 10px;
    background: #fff;
    color: #533f34;
    font-size: 0.86rem;
    font-weight: 800;
    padding: 0.5rem 0.55rem;
    cursor: pointer;
}

.zone-btn.active {
    border-color: #7f5745;
    background: #f3e7df;
    color: #492f26;
}

.pay-amount {
    margin: 10px 0;
    color: #5f534d;
    font-size: 0.92rem;
}

.pay-buttons {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

#paypal-btn,
#card-btn {
    min-height: 44px;
}

.pay-powered {
    margin: 10px 0 0;
    color: #7b6d66;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.pay-lock-icon {
    width: 14px;
    height: 14px;
    max-width: none;
    display: block;
    flex: 0 0 auto;
}

.pay-btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

#region-confirm {
    width: min(380px, 92vw);
    padding: 16px 16px 14px;
}

#region-confirm h3 {
    margin: 0 0 8px;
    color: var(--accent);
}

#region-confirm p {
    margin: 0 0 12px;
    color: #61544d;
}

.region-confirm-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.region-confirm-cancel,
.region-confirm-yes {
    border: 1px solid #d0c2b7;
    border-radius: 10px;
    padding: 0.46rem 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.region-confirm-cancel {
    background: #ece4de;
    color: #4c3c34;
}

.region-confirm-yes {
    background: #5f1c1c;
    color: #fff;
    border-color: #5f1c1c;
}

#stock-modal {
    width: min(440px, 92vw);
    padding: 14px 16px 12px;
}

#stock-modal h2 {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 1.14rem;
}

#stock-modal p {
    margin: 0;
    color: #61544d;
}

/* Contact modal shell (inline styles still define full look) */
.contact-modal {
    z-index: 2101;
}

/* Responsive */
@media (max-width: 1100px) {
    .header-text {
        left: 14px;
    }

    .social-icons {
        right: 14px;
    }

    .about-card,
    .drone-card {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .about-body,
    .drone-body {
        max-height: min(54vh, 460px);
    }

    .howtobuy-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        height: clamp(440px, 72vh, 760px);
        max-height: 760px;
        overflow: hidden;
    }

    .howtobuy-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .howtobuy-nav-item {
        min-height: 72px;
    }

    .howtobuy-panel {
        min-height: 0;
        height: 100%;
    }

    .howtobuy-content {
        min-height: 0;
    }
}

@media (max-width: 780px) {
    header {
        min-height: clamp(268px, 40vh, 340px);
    }

    .navbar {
        border-radius: 18px;
        grid-template-columns: 1fr;
        justify-items: stretch;
        align-items: stretch;
        gap: 8px;
        width: calc(100% - 16px);
        padding: 8px;
    }

    .logo-link {
        justify-self: center;
        width: max-content;
        margin-inline: auto;
    }

    .logo {
        height: 34px;
    }

    nav {
        min-width: 0;
        overflow: visible;
    }

    nav ul,
    .nav-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        overflow: visible;
        padding: 0;
    }

    nav ul li {
        min-width: 0;
    }

    nav ul li a {
        width: 100%;
        min-height: 34px;
        white-space: normal;
        text-align: center;
        line-height: 1.12;
        padding: 0.34rem 0.62rem;
        font-size: 0.73rem;
    }

    .header-text {
        left: 12px;
        right: 12px;
        bottom: 56px;
    }

    .header-text h1 {
        font-size: clamp(1.46rem, 6.2vw, 2rem);
    }

    .header-text .subtitle {
        font-size: 0.86rem;
    }

    .social-icons {
        left: 12px;
        right: 12px;
        bottom: 14px;
        justify-content: flex-start;
        gap: 8px;
    }

    .social-icons a {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }

    .home-icon-wrapper,
    .home-icon-wrapper-supplies {
        display: none;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-page .contact-icon-box {
        width: clamp(90px, 22vw, 108px);
        height: clamp(90px, 22vw, 108px);
    }

    .pay-zones {
        grid-template-columns: 1fr;
    }

    .howtobuy-card {
        height: clamp(420px, 70vh, 700px);
    }
}

@media (min-width: 724px) and (max-width: 780px) {
    header {
        min-height: clamp(170px, 26vh, 300px);
    }

    .navbar {
        border-radius: 999px;
        grid-template-columns: auto minmax(0, 1fr);
        justify-items: stretch;
        align-items: center;
        gap: 12px;
        width: min(var(--content-width), calc(100% - 20px));
        padding: 8px 10px;
    }

    .logo-link {
        justify-self: start;
        width: auto;
        margin-inline: 0;
    }

    .logo {
        height: clamp(32px, 3.7vw, 54px);
    }

    nav {
        min-width: 0;
        overflow: visible;
    }

    nav ul,
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
        overflow: visible;
        padding: 0;
    }

    nav ul li a {
        width: auto;
        min-height: 0;
        white-space: nowrap;
        text-align: center;
        line-height: normal;
        padding: 0.45rem 0.9rem;
        font-size: clamp(0.72rem, 0.95vw, 0.92rem);
    }

    .header-text {
        left: 14px;
        right: auto;
        bottom: clamp(14px, 2vh, 24px);
    }

    .header-text h1 {
        font-size: clamp(1.52rem, 2.8vw, 2.5rem);
    }

    .header-text .subtitle {
        font-size: clamp(0.72rem, 0.95vw, 0.95rem);
    }

    .social-icons {
        left: auto;
        right: 14px;
        bottom: clamp(12px, 2vh, 20px);
        justify-content: flex-end;
        gap: 9px;
    }

    .social-icons a {
        width: clamp(28px, 2.2vw, 36px);
        height: clamp(28px, 2.2vw, 36px);
        font-size: clamp(0.9rem, 1.1vw, 1.12rem);
    }
}

@media (min-width: 521px) and (max-width: 723px) {
    nav ul li:last-child,
    .nav-links li:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: min(240px, 100%);
    }

    .header-text h1 {
        font-size: clamp(1.36rem, 3.2vw, 1.52rem);
    }

    .header-text .subtitle {
        font-size: clamp(0.72rem, 1.7vw, 0.82rem);
    }
}

@media (max-width: 520px) {
    header {
        min-height: clamp(252px, 40vh, 314px);
    }

    .navbar {
        width: calc(100% - 12px);
        padding: 7px;
    }

    .logo {
        height: 30px;
    }

    .logo-link {
        width: max-content;
        margin-inline: auto;
    }

    nav ul li:last-child,
    .nav-links li:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: min(220px, 100%);
    }

    nav ul li a {
        padding: 0.32rem 0.58rem;
        font-size: 0.69rem;
    }

    .header-text {
        left: 10px;
        right: 10px;
        bottom: 52px;
    }

    .header-text h1 {
        font-size: clamp(1.36rem, 7vw, 1.74rem);
    }

    .header-text .subtitle {
        font-size: 0.8rem;
    }

    .social-icons {
        left: 10px;
        right: 10px;
        bottom: 12px;
    }

    .social-icons a {
        width: 28px;
        height: 28px;
        font-size: 0.88rem;
    }

    main {
        width: calc(100% - 14px);
    }

    .notification-bar {
        width: calc(100% - 14px);
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .about-card,
    .howtobuy-card,
    .drone-card {
        padding: 12px;
        border-radius: 16px;
    }

    .howtobuy-card {
        height: clamp(400px, 68vh, 640px);
    }

    .about-media,
    .drone2-gallery {
        height: clamp(170px, 48vw, 240px);
    }

    .howtobuy-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .howtobuy-scroll,
    .drone-body,
    .about-body {
        font-size: 0.84rem;
    }

    .home-icon-wrapper,
    .home-icon-wrapper-supplies {
        display: none;
    }

    .tooltip-text,
    .tooltip-text-supplies {
        display: none;
    }
}

@media (max-width: 723px) and (max-height: 700px) {
    header {
        min-height: clamp(272px, 46vh, 330px);
    }

    .navbar {
        padding: 8px;
        gap: 7px;
    }

    .header-text {
        bottom: 52px;
    }

    .social-icons {
        bottom: 14px;
    }
}

@media (min-width: 521px) and (max-width: 723px) and (max-height: 580px) {
    header {
        min-height: clamp(312px, 60vh, 380px);
    }

    .navbar {
        padding: 8px;
        gap: 6px;
    }

    nav ul,
    .nav-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    nav ul li a {
        min-height: 32px;
        padding: 0.3rem 0.5rem;
        font-size: 0.68rem;
    }

    .header-text {
        bottom: 56px;
    }

    .header-text h1 {
        font-size: clamp(1.3rem, 2.9vw, 1.45rem);
    }

    .header-text .subtitle {
        font-size: clamp(0.7rem, 1.45vw, 0.78rem);
    }

    .social-icons {
        bottom: 16px;
    }

    .social-icons a {
        width: 28px;
        height: 28px;
        font-size: 0.86rem;
    }
}

@media (max-width: 723px) {
    .home-icon-wrapper,
    .home-icon-wrapper-supplies {
        display: flex;
        right: 12px !important;
        top: clamp(176px, 28.4vh, 230px);
        bottom: auto;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 723px) and (max-height: 700px) {
    .home-icon-wrapper,
    .home-icon-wrapper-supplies {
        top: clamp(186px, 31.4vh, 226px);
    }
}

@media (min-width: 724px) and (max-width: 1023px) {
    .home-icon-wrapper,
    .home-icon-wrapper-supplies {
        display: flex;
        right: 76px !important;
        top: clamp(94px, 16.5vh, 156px);
        bottom: auto;
        width: 42px;
        height: 42px;
    }
}

/* Compact desktop heights (example: 1280x1024) */
@media (min-width: 1024px) and (max-height: 1080px) {
    header {
        min-height: clamp(160px, 22vh, 230px);
    }

    .about-card,
    .howtobuy-card,
    .drone-card {
        min-height: clamp(420px, 56vh, 640px);
        max-height: clamp(420px, 62vh, 680px);
    }

    .howtobuy-card {
        height: clamp(420px, 58vh, 660px);
    }

    .about-body,
    .howtobuy-scroll,
    .drone-body {
        font-size: clamp(0.83rem, 0.9vw, 0.94rem);
    }

    .drone2-gallery {
        height: clamp(190px, 28vh, 280px);
    }
}
