/* ============================================================
   Responsive cho H-Watch
   Ưu tiên chỉnh bằng CSS để giữ layout desktop trong style.css.
   ============================================================ */

body {
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

img,
video,
input,
textarea,
select,
button {
    max-width: 100%;
}

button,
a,
input,
textarea,
select,
.nav-link,
.filter-btn,
.booking-btn,
.contact-submit,
.product-action,
.btn-outline,
.btn-collection,
.hero-btn,
.feedback-btn,
.feedback-dot,
.back-to-top,
.menu-toggle {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: none), (pointer: coarse) {
    *,
    *::before,
    *::after {
        transition-duration: 0s !important;
        transition-delay: 0s !important;
        animation-duration: 0s !important;
        animation-delay: 0s !important;
    }
}

/* Tablet lớn */
@media screen and (max-width: 1100px) {
    .container {
        width: 92%;
    }

    .navbar {
        gap: 16px;
    }

    .nav-link {
        font-size: medium;
    }

    .nav-icons {
        gap: 12px;
    }

    .product-item {
        width: calc((100% - 40px) / 3);
    }
}

/* Tablet */
@media screen and (max-width: 992px) {
    html {
        scroll-padding-top: 75px;
    }

    section {
        scroll-margin-top: 75px;
    }

    .nav-wrapper {
        position: relative;
        height: 70px;
    }

    .menu-toggle {
        display: block;
        width: 42px;
        height: 42px;
        padding: 6px;
        z-index: 1001;
    }

    .menu-toggle span {
        transition: transform 0.25s, opacity 0.25s;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .navbar {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background-color: white;
        border: 1px solid #000;
        border-top: none;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    }

    .navbar.show {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 13px 18px;
        border-bottom: 1px solid #ddd;
        font-size: large;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-icons {
        display: none;
    }

    .hero {
        height: 74vh;
        min-height: 500px;
    }

    .hero-slide {
        background-position: 62% center;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-content p {
        max-width: 620px;
        font-size: large;
    }

    .about-wrapper,
    .services-wrapper,
    .contact-wrapper {
        flex-direction: column;
    }

    .about-content,
    .about-image,
    .collection-card,
    .service-grid,
    .contact-info,
    .contact-form {
        width: 100%;
    }

    .about-content {
        padding: 0;
    }

    .about-image img {
        height: 420px;
    }

    .collection-card,
    .collection-card img {
        min-height: 330px;
    }

    .service-card {
        width: calc((100% - 18px) / 2);
    }

    .product-item {
        width: calc((100% - 20px) / 2);
    }

    .pricing-card {
        width: calc((100% - 20px) / 2);
    }

    .pricing-card:last-child {
        width: 100%;
    }

    .contact-wrapper {
        margin-bottom: 45px;
    }

    .footer-col {
        width: calc((100% - 20px) / 2);
    }
}

/* Điện thoại ngang và tablet nhỏ */
@media screen and (max-width: 768px) {
    html {
        scroll-padding-top: 68px;
    }

    section {
        scroll-margin-top: 68px;
    }

    .section-title {
        margin-bottom: 24px;
    }

    .section-title h2 {
        font-size: x-large;
    }

    .title-line {
        width: 80px;
    }

    .about-section,
    .services-section,
    .products-section,
    .pricing-section,
    .contact-section {
        padding: 26px 0;
    }

    .hero {
        height: 62vh;
        min-height: 460px;
    }

    .hero-slide {
        background-size: auto 100%;
        background-position: 68% center;
        background-repeat: no-repeat;
        background-color: #f8f8f8;
    }

    .hero-content {
        width: 82%;
        height: 100%;
        align-items: flex-start;
        text-align: left;
    }

    .hero-content h1 {
        margin: 0 0 12px;
        font-size: 36px;
        line-height: 1.18;
    }

    .hero-content p {
        max-width: 420px;
        margin: 0 0 16px;
        font-size: medium;
        line-height: 1.45;
    }

    .search-form {
        width: 100%;
        max-width: 420px;
        height: 44px;
        margin: 0;
        flex-direction: row;
        border: 1px solid #111;
        border-radius: 40px;
    }

    .search-form input {
        min-width: 0;
        padding: 0 14px;
        font-size: small;
    }

    .search-form button {
        flex: 0 0 96px;
        padding: 0 12px;
        border-top: none;
        border-right: none;
        border-bottom: none;
        border-left: 1px solid #111;
        border-radius: 0 40px 40px 0;
        font-size: small;
        white-space: nowrap;
    }

    .hero-btn {
        width: 38px;
        height: 38px;
        font-size: large;
        background-color: rgba(255, 255, 255, 0.55);
    }

    .hero-btn.prev {
        left: 10px;
    }

    .hero-btn.next {
        right: 10px;
    }

    .about-wrapper {
        gap: 16px;
    }

    .about-image {
        order: 1;
    }

    .about-content {
        order: 2;
    }

    .about-image img {
        height: 330px;
        object-fit: cover;
    }

    .about-content h3 {
        font-size: large;
        margin-bottom: 12px;
        text-align: left;
    }

    .about-content p {
        margin-bottom: 10px;
        font-size: medium;
        line-height: 1.65;
        text-align: justify;
    }

    .main-btn {
        padding: 10px 18px;
        font-size: small;
    }

    .services-wrapper {
        gap: 14px;
    }

    .collection-card,
    .collection-card img {
        min-height: 260px;
    }

    .collection-content {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

    .collection-content h3 {
        margin-bottom: 6px;
        font-size: medium;
    }

    .collection-content p {
        margin-bottom: 12px;
        font-size: small;
        line-height: 1.45;
    }

    .btn-collection,
    .btn-outline {
        padding: 8px 12px;
        font-size: small;
    }

    .service-grid {
        gap: 12px;
    }

    .service-card {
        width: calc((100% - 12px) / 2);
        padding: 16px 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    .service-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 8px;
    }

    .service-card h3 {
        min-height: 34px;
        margin-bottom: 6px;
        font-size: medium;
        line-height: 1.2;
    }

    .service-card p {
        display: -webkit-box;
        min-height: 54px;
        margin-bottom: 12px;
        overflow: hidden;
        color: #555;
        font-size: small;
        line-height: 1.35;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .product-filter {
        gap: 8px;
        margin-bottom: 20px;
    }

    .filter-btn {
        padding: 8px 13px;
        font-size: small;
    }

    .product-grid {
        gap: 12px;
    }

    .product-item {
        width: calc((100% - 12px) / 2);
        min-width: 0;
    }

    .product-card {
        height: 100%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    .sale-badge {
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        font-size: 11px;
    }

    .product-image {
        height: 180px;
    }

    .product-content {
        padding: 12px;
    }

    .product-content h3 {
        display: -webkit-box;
        min-height: 38px;
        margin-bottom: 6px;
        overflow: hidden;
        font-size: medium;
        line-height: 1.2;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .product-desc {
        display: -webkit-box;
        min-height: 38px;
        margin-bottom: 8px;
        overflow: hidden;
        font-size: small;
        line-height: 1.35;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .product-price {
        flex-wrap: wrap;
        gap: 4px 8px;
        margin-bottom: 6px;
    }

    .price-new {
        font-size: medium;
    }

    .price-old,
    .product-rating {
        font-size: small;
    }

    .product-rating {
        margin-bottom: 8px;
    }

    .product-action {
        padding: 9px 8px;
        font-size: small;
    }

    .product-more {
        margin-top: 22px;
    }

    .product-more-btn {
        padding: 10px 20px;
        font-size: small;
    }

    /* --- Pricing: 3 card compact --- */
    .pricing-card {
        width: 100%;
    }

    .pricing-card:last-child {
        width: 100%;
    }

    .pricing-header {
        padding: 14px 18px;
    }

    .pricing-header h3 {
        font-size: large;
    }

    .pricing-body {
        padding: 14px 18px;
    }

    .pricing-body .pricing-price {
        font-size: medium;
        margin-bottom: 8px;
    }

    .pricing-body p {
        font-size: small;
        margin-bottom: 10px;
    }

    .pricing-body li {
        font-size: small;
    }

    .pricing-footer {
        padding: 0 18px 14px;
    }

    .booking-btn {
        padding: 10px 16px;
        font-size: small;
    }

    .contact-wrapper {
        gap: 14px;
        margin-bottom: 34px;
    }

    .contact-form {
        order: 1;
    }

    .contact-info {
        order: 2;
    }

    .contact-info,
    .contact-form {
        padding: 20px;
    }

    .contact-info h3 {
        font-size: large;
        margin-bottom: 12px;
    }

    .contact-info p {
        margin-bottom: 8px;
        font-size: small;
        line-height: 1.5;
    }

    .contact-group {
        margin-bottom: 12px;
    }

    .contact-group input,
    .contact-group textarea,
    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: small;
    }

    .contact-group textarea {
        min-height: 96px;
    }

    .contact-submit {
        padding: 11px 16px;
        font-size: small;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        width: 100%;
    }

    .modal-box {
        max-width: 94vw;
    }

    .modal-form,
    .pricing-body,
    .pricing-footer {
        box-sizing: border-box;
    }

    .feedback-carousel {
        padding: 0 0 34px;
    }

    .feedback-btn {
        display: none;
    }

    .feedback-card {
        padding: 22px 18px;
    }

    .feedback-card p {
        font-size: medium;
        line-height: 1.6;
    }

    .site-footer {
        padding: 32px 0 16px;
    }

    .footer-grid {
        gap: 16px 20px;
        padding-bottom: 20px;
    }

    .footer-col:nth-child(3) {
        order: 1;
    }

    .footer-col:nth-child(4) {
        order: 2;
    }

    .footer-col:nth-child(1) {
        order: 3;
    }

    .footer-col:nth-child(2) {
        order: 4;
    }

    .footer-col {
        width: calc((100% - 20px) / 2);
    }

    .footer-col h3 {
        margin-bottom: 10px;
        font-size: large;
    }

    .footer-col p {
        margin-bottom: 6px;
        font-size: small;
        line-height: 1.45;
    }

    .footer-bottom {
        padding-top: 12px;
    }

    .footer-bottom p {
        font-size: small;
    }
}

/* Điện thoại dọc, ưu tiên tỉ lệ màn hình khoảng 19.5:9 */
@media screen and (max-width: 576px) {
    html {
        scroll-padding-top: 60px;
    }

    section {
        scroll-margin-top: 60px;
    }

    .container {
        width: 92%;
    }

    .nav-wrapper {
        height: 60px;
    }

    .header {
        min-height: 60px;
    }

    .logo {
        font-size: large;
    }

    .menu-toggle {
        width: 38px;
        height: 38px;
        padding: 5px;
    }

    .menu-toggle span {
        width: 26px;
        height: 3px;
        margin: 4px 0;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .navbar {
        top: 60px;
    }

    .nav-link {
        padding: 11px 14px;
        font-size: medium;
    }

    .hero {
        height: 47vh;
        min-height: 395px;
        max-height: 455px;
        margin-top: 60px;
    }

    .hero-slide {
        background-size: auto 100%;
        background-position: 72% center;
    }

    .hero-content {
        width: 78%;
        max-width: 320px;
        height: 100%;
        padding: 0;
    }

    .hero-content h1 {
        font-size: 29px;
        letter-spacing: 0.5px;
    }

    .hero-content p {
        max-width: 300px;
        font-size: 14px;
        line-height: 1.35;
    }

    .search-form {
        max-width: 310px;
        height: 40px;
    }

    .search-form input {
        padding: 0 12px;
        font-size: 13px;
    }

    .search-form button {
        flex-basis: 82px;
        padding: 0 8px;
        font-size: 13px;
    }

    .hero-content h1,
    .hero-content p {
        text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95);
    }

    .hero-btn {
        top: auto;
        bottom: 22px;
        width: 32px;
        height: 32px;
        font-size: medium;
        transform: none;
    }

    .hero-btn.prev {
        left: 22px;
    }

    .hero-btn.next {
        right: 22px;
    }

    .section-title {
        margin-bottom: 18px;
    }

    .section-title h2 {
        font-size: 21px;
        line-height: 1.25;
    }

    .about-section,
    .services-section,
    .products-section,
    .pricing-section,
    .contact-section {
        padding: 22px 0;
    }

    .about-image img {
        height: 245px;
        border-radius: 8px;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    }

    .about-content h3 {
        font-size: 17px;
        line-height: 1.3;
    }

    .about-content p {
        font-size: 14px;
        line-height: 1.55;
    }

    .collection-card,
    .collection-card img {
        min-height: 210px;
    }

    .service-grid {
        gap: 10px;
    }

    .service-card {
        width: calc((100% - 10px) / 2);
        padding: 12px 8px;
        border-radius: 8px;
    }

    .service-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 6px;
    }

    .service-card h3 {
        min-height: 30px;
        font-size: 14px;
    }

    .service-card p {
        min-height: 50px;
        font-size: 12.5px;
        line-height: 1.32;
    }

    .btn-outline,
    .btn-collection {
        padding: 7px 9px;
        font-size: 12px;
    }

    .product-filter {
        gap: 6px;
        margin-bottom: 16px;
    }

    .filter-btn {
        padding: 7px 10px;
        font-size: 12px;
    }

    .product-grid {
        gap: 10px;
    }

    .product-item {
        width: calc((100% - 10px) / 2);
    }

    .product-image {
        height: clamp(118px, 34vw, 150px);
    }

    .product-content {
        padding: 9px 7px 10px;
    }

    .product-content h3 {
        min-height: 34px;
        font-size: 14px;
    }

    .product-desc {
        min-height: 34px;
        margin-bottom: 6px;
        font-size: 12px;
        line-height: 1.35;
    }

    .product-price {
        flex-direction: column;
        gap: 1px;
        margin-bottom: 5px;
    }

    .price-new {
        font-size: 13px;
        line-height: 1.2;
    }

    .price-old {
        font-size: 11px;
        line-height: 1.2;
    }

    .product-rating {
        margin-bottom: 6px;
        font-size: 11px;
        line-height: 1;
    }

    .product-action {
        padding: 8px 6px;
        border-radius: 6px;
        font-size: 12px;
    }

    .product-more-btn {
        padding: 9px 16px;
    }

    /* --- Pricing: 3 card compact, vừa màn hình --- */
    .pricing-grid {
        gap: 10px;
    }

    .pricing-card {
        width: 100%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    }

    .pricing-header {
        padding: 10px 16px;
    }

    .pricing-header h3 {
        font-size: medium;
    }

    .pricing-body {
        padding: 10px 16px;
    }

    .pricing-body .pricing-price {
        font-size: medium;
        margin-bottom: 6px;
    }

    .pricing-body p {
        font-size: x-small;
        margin-bottom: 8px;
    }

    .pricing-body ul {
        line-height: 1.5;
        margin-bottom: 0;
    }

    .pricing-body li {
        font-size: x-small;
    }

    .pricing-footer {
        padding: 8px 16px 12px;
    }

    .booking-btn {
        padding: 8px 14px;
        font-size: x-small;
    }

    .modal-header {
        padding: 12px 16px;
    }

    .modal-header h3 {
        font-size: large;
    }

    .modal-form {
        padding: 16px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
        padding: 10px 18px;
        font-size: small;
    }

    .contact-wrapper {
        gap: 12px;
        margin-bottom: 26px;
    }

    .contact-info,
    .contact-form {
        padding: 14px;
        border-radius: 8px;
    }

    .contact-info h3,
    .footer-col h3 {
        font-size: 16px;
    }

    .contact-group label,
    .form-group label {
        margin-bottom: 5px;
        font-size: 13px;
    }

    .contact-group input,
    .contact-group textarea,
    .form-group input,
    .form-group textarea {
        padding: 9px 10px;
        border-radius: 7px;
    }

    .contact-group textarea {
        min-height: 82px;
    }

    .site-footer {
        padding: 24px 0 14px;
    }

    .footer-grid {
        gap: 12px;
        padding-bottom: 16px;
    }

    .footer-col {
        width: calc((100% - 12px) / 2);
        min-width: 0;
    }

    .footer-col h3 {
        margin-bottom: 8px;
    }

    .footer-col p {
        font-size: 12.5px;
        line-height: 1.38;
    }

    .footer-bottom p {
        font-size: 12px;
    }

    .back-to-top {
        right: 12px;
        bottom: 12px;
        width: 38px;
        height: 38px;
        font-size: medium;
    }
}

/* Điện thoại rất nhỏ */
@media screen and (max-width: 380px) {
    .hero-content h1 {
        font-size: 26px;
    }

    .hero-content p {
        font-size: 13px;
    }

    .section-title h2 {
        font-size: 19px;
    }

    .service-card {
        padding: 10px 6px;
    }

    .product-image {
        height: 112px;
    }

    .product-content h3 {
        font-size: 13px;
    }

    .product-desc,
    .service-card p {
        font-size: 11.5px;
    }

    .footer-col p {
        font-size: 12px;
    }
}
