/* Responsive Styles (Mobile-First) */
@media (min-width: 768px) {
    .container {
        padding: 0 calc(var(--spacing-base) * 2);
    }
    .posts-loop {
        grid-template-columns: repeat(2, 1fr);
    }
    .site-main.sidebar-right .posts-loop {
        width: 70%;
        float: left;
    }
    .site-main.sidebar-right #secondary {
        width: 25%;
        float: right;
    }
    .site-main.sidebar-left .posts-loop {
        width: 70%;
        float: right;
    }
    .site-main.sidebar-left #secondary {
        width: 25%;
        float: left;
    }
    /* ADDED: Responsive Header at Tablet */
    .xbrand-header-container {
        flex-wrap: wrap;
        gap: 15px;
    }
    .xbrand-header-left,
    .xbrand-header-center,
    .xbrand-header-right {
        flex: 0 0 auto;
    }
    .hamburger {
        display: none;
    }
    .mega-menu-columns-2,
    .mega-menu-columns-3,
    .mega-menu-columns-4 {
        display: grid;
        gap: var(--spacing-base);
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: var(--wp--style--global--wide-size);
    }
    .posts-loop {
        grid-template-columns: repeat(3, 1fr);
    }
    .hero h1 {
        font-size: 3.5rem;
    }
    /* ADDED: Responsive Header at Desktop */
    .xbrand-header-container {
        flex-wrap: nowrap;
        gap: 20px;
    }
    .xbrand-header-left {
        max-width: 200px;
    }
    .xbrand-header-center {
        flex: 1;
        min-width: 200px;
        max-width: 400px;
    }
    .xbrand-header-right {
        flex: 0 0 auto;
    }
}

@media (max-width: 767px) {
    .site-main {
        padding: var(--spacing-base);
    }
    .site-main.full-width .posts-loop {
        width: 100%;
    }
    #secondary {
        margin-top: calc(var(--spacing-base) * 2);
    }
    /* ADDED: Mobile Header */
    .xbrand-header-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .xbrand-header-left,
    .xbrand-header-center,
    .xbrand-header-right {
        width: 100%;
        text-align: center;
    }
    .hamburger {
        display: block;
        position: absolute;
        top: 10px;
        right: 10px;
    }
    .mega-menu-columns-2,
    .mega-menu-columns-3,
    .mega-menu-columns-4 {
        display: block;
        grid-template-columns: 1fr;
    }
    .mega-menu {
        position: static;
        width: 100%;
        box-shadow: none;
    }
    .sub-menu {
        position: static;
        width: 100%;
    }
    /* ADDED: Mobile Social Media */
    .social-media-links {
        gap: 15px;
        font-size: var(--font-size-base);
    }
    /* ADDED: Grid/List Toggle on Mobile */
    .posts-loop.grid-view,
    .featured-products.grid-view {
        grid-template-columns: 1fr;
    }
    .posts-loop.list-view,
    .featured-products.list-view {
        display: block;
    }
}

/* ADDED: RTL Responsive Styles */
@media (min-width: 768px) {
    body.rtl .site-main.sidebar-right .posts-loop {
        float: right;
        margin-left: 2.5%;
    }
    body.rtl .site-main.sidebar-right #secondary {
        float: left;
        margin-right: 2.5%;
    }
    body.rtl .site-main.sidebar-left .posts-loop {
        float: left;
        margin-right: 2.5%;
    }
    body.rtl .site-main.sidebar-left #secondary {
        float: right;
        margin-left: 2.5%;
    }
}

@media (max-width: 767px) {
    body.rtl .xbrand-header-container {
        align-items: flex-end;
    }
    body.rtl .xbrand-header-left,
    body.rtl .xbrand-header-center,
    body.rtl .xbrand-header-right {
        text-align: right;
    }
    body.rtl .hamburger {
        right: auto;
        left: 10px;
    }
    body.rtl .social-media-links {
        direction: rtl;
    }
}