/* =========================================================
   Rack Manufacturers - Responsive CSS
   Load this AFTER style.css
   ========================================================= */

/* ---------- Large Tablet / Small Desktop ---------- */
@media (max-width: 1200px) {

    .container {
        width: min(100% - 30px, 1140px);
    }

    /* .top-header {
        gap: 18px;
    } */  

    .brand {
        min-width: 175px;
    }

    .header-actions {
        gap: 10px;
    }

    .nav-links a {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .category-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* ---------- Tablet ---------- */
@media (max-width: 991px) {

    .container {
        width: min(100% - 28px, 960px);
    }

    /* Header */
    .top-header {
        min-height: auto;
        padding: 10px 0;
        flex-wrap: wrap;
    }

    .brand {
        min-width: auto;
    }

    .search-box {
        order: 3;
        width: 100%;
        max-width: none;
        flex-basis: 100%;
    }

    .header-actions {
        margin-left: auto;
    }

    .head-action:nth-child(2) {
        display: none;
    }

    /* Navigation */
    .nav-inner {
        position: relative;
    }

    .nav-links {
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        padding-left: 11px;
        padding-right: 11px;
    }

    /* Category dropdown */
    .category-menu {
        width: 250px;
    }

    /* Hero */
    .hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-content {
        padding: 35px 0 20px;
    }

    .hero-image {
        height: 310px;
    }

    .hero h1 {
        font-size: 34px;
        max-width: 700px;
    }

    /* Categories */
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 14px;
    }

    .stats-grid div {
        border-right: 1px solid #cad9e8;
    }

    .stats-grid div:nth-child(3n) {
        border-right: 0;
    }

    /* Products */
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Banners */
    .feature-banners {
        grid-template-columns: 1fr;
    }

    /* How it works */
    .steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .steps > div:nth-child(2) {
        border-right: 0;
    }

    /* Seller */
    .seller-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .seller-benefits {
        margin-top: 5px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}


/* ---------- Mobile ---------- */
@media (max-width: 767px) {

    .container {
        width: calc(100% - 24px);
    }

    /* Header */
    .top-header {
        gap: 9px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        font-size: 21px;
    }

    .brand strong {
        font-size: 17px;
    }

    .brand b {
        font-size: 11px;
    }

    .brand small {
        font-size: 10px;
    }

    .header-actions {
        display: none;
    }

    .search-box {
        height: 40px;
    }

    .search-box input {
        min-width: 0;
        font-size: 12px;
    }

    .search-box button {
        padding: 0 18px;
    }

    /* Mobile navigation */
    .main-nav {
        overflow: visible;
    }

    .nav-inner {
        width: 100%;
        min-width: 0;
        height: 45px;
        overflow: visible;
    }

    .category-dropdown {
        flex-shrink: 0;
    }

    .category-btn {
        min-width: 135px;
        padding: 0 12px;
        font-size: 12px;
    }

    .nav-links {
        flex: 1;
        overflow-x: auto;
    }

    .nav-links a {
        font-size: 11px;
        padding: 14px 10px;
    }

    .sell-btn {
        display: none;
    }

    /* Dropdown */
    .category-menu {
        top: 45px;
        left: 0;
        width: 255px;
        max-height: 70vh;
        overflow-y: auto;
    }

    .category-menu > a {
        padding: 11px 14px;
        font-size: 12px;
    }

    /* Hero */
    .hero-grid {
        display: block;
    }

    .hero-content {
        padding: 28px 0 12px;
    }

    .hero h1 {
        font-size: 28px;
        line-height: 1.16;
        margin-top: 12px;
    }

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

    .hero-points {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 9px;
        font-size: 10px;
        margin: 16px 0;
    }

    .hero-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .hero-buttons .btn {
        width: 100%;
        padding: 10px 8px;
        font-size: 11px;
    }

    .hero-image {
        height: 255px;
        margin-top: 8px;
    }

    .rack-illustration {
        width: 100%;
        max-width: 500px;
        height: 225px;
    }

    .rack {
        transform: scale(.82);
        transform-origin: bottom left;
    }

    .rack-a {
        left: 20px;
    }

    .rack-b {
        left: 135px;
    }

    .hero-tag {
        right: 5px;
        padding: 6px 9px;
        font-size: 8px;
    }

    .tag-1 {
        top: 25px;
    }

    .tag-2 {
        top: 91px;
    }

    .tag-3 {
        top: 157px;
    }

    /* Section headings */
    .section-head {
        gap: 10px;
    }

    .section-head h2 {
        font-size: 18px;
    }

    .section-head a {
        font-size: 15px;
        white-space: nowrap;
    }

    /* Categories */
    .categories {
        padding-top: 20px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 7px;
    }

    .category-card {
        padding: 8px 3px;
    }

    .cat-img {
        height: 65px;
        font-size: 40px;
    }

    .category-card b {
        font-size: 15px;
        line-height: 1.25;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 14px 0;
        gap: 10px 0;
    }

    .stats-grid div {
        border-right: 1px solid #cad9e8;
    }

    .stats-grid div:nth-child(2n) {
        border-right: 0;
    }

    .stats-grid strong {
        font-size: 16px;
    }

    .stats-grid span {
        font-size: 13px;
    }

    /* Products */
    .products {
        padding-top: 22px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-card {
        padding: 7px;
    }

    .product-visual {
        height: 105px;
        font-size: 55px;
    }

    .product-card h3 {
        font-size: 15px;
    }

    .product-card a {
        font-size: 14px;
        padding: 5px 10px;
    }

    /* Banners */
    .feature-banner {
        min-height: 155px;
        padding: 17px;
    }

    .feature-banner h2 {
        font-size: 17px;
    }

    .feature-banner p {
        font-size: 10px;
    }

    .warehouse-art {
        width: 105px;
        margin-right: 10px;
        flex-shrink: 0;
    }

    .warehouse-art span {
        width: 23px;
        height: 100px;
    }

    .custom-rack {
        font-size: 75px;
    }

    /* Steps */
    .steps {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 12px;
    }

    .steps > div,
    .steps > div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid #dce5ef;
        padding: 0 5px 12px;
    }

    .steps > div:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    /* Seller */
    .seller-grid h2 {
        font-size: 21px;
    }

    .seller-benefits {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    .seller-benefits div {
        border-left: 0;
        border-bottom: 1px solid #cfdeec;
    }

    /* Reviews */
    .review-grid {
        grid-template-columns: 1fr;
    }

    .review-grid article {
        padding: 14px;
    }

    /* Insights */
    .insight-grid {
        grid-template-columns: 1fr;
    }

    .insight-image {
        width: 110px;
        min-height: 95px;
    }

    .insight-grid h3 {
        font-size: 15px;
    }

    /* Requirement */
    .requirement {
        padding: 28px 0;
    }

    .requirement-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .requirement h2 {
        font-size: 22px;
    }

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

    .requirement input:nth-child(3) {
        grid-column: auto;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 25px 18px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .copyright {
        flex-direction: column;
        gap: 5px;
    }

    .back-top {
        right: 12px;
        bottom: 18px;
    }
}


/* ---------- Small Mobile ---------- */
@media (max-width: 480px) {

    .hero h1 {
        font-size: 24px;
    }

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

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

    .hero-image {
        height: 220px;
    }

    .rack-illustration {
        height: 195px;
    }

    .rack {
        transform: scale(.68);
    }

    .rack-a {
        left: 0;
    }

    .rack-b {
        left: 95px;
    }

    .hero-tag {
        right: 0;
    }

    .tag-1 {
        top: 18px;
    }

    .tag-2 {
        top: 76px;
    }

    .tag-3 {
        top: 134px;
    }

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

    .cat-img {
        height: 70px;
    }

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

    .product-visual {
        height: 90px;
    }

    .feature-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .warehouse-art {
        width: 100%;
        height: 55px;
        margin: 0 0 10px;
    }

    .warehouse-art span {
        height: 50px;
    }

    .custom-rack {
        display: none;
    }

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

    .footer-brand {
        grid-column: auto;
    }
}


/* ---------- Very Small Phones ---------- */
@media (max-width: 360px) {

    .brand strong {
        font-size: 15px;
    }

    .brand b {
        font-size: 10px;
    }

    .category-btn {
        min-width: 125px;
        font-size: 11px;
    }

    .nav-links a {
        padding-left: 8px;
        padding-right: 8px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .category-grid {
        gap: 5px;
    }

    .cat-img {
        height: 60px;
        font-size: 35px;
    }
}
