/**
 * Responsive Styles
 *
 * @package Toy
 * @since 1.0.0
 */

/* ==========================================================================
   Desktop Large (1440px and up)
   ========================================================================== */

@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }
}

/* ==========================================================================
   Tablet (768px to 1023px)
   ========================================================================== */

@media (max-width: 1023px) {
    .container {
        max-width: 100%;
        padding: 0 30px;
    }

    .header-main-inner {
        flex-wrap: wrap;
        padding: 1rem 20px;
        min-height: auto;
    }

    .site-branding {
        flex: 0 0 auto;
    }

    .header-right {
        flex: 0 0 auto;
        margin-left: auto;
        gap: 0.5rem;
    }

    .header-search {
        display: none;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--bg-color);
        border-top: 1px solid var(--border-color);
        box-shadow: var(--box-shadow);
        z-index: 999;
        margin: 0;
        padding: 0;
    }

    .main-navigation.active {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-menu li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu a {
        padding: 1rem;
    }

    .nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-color);
        display: none;
        background: var(--bg-light);
    }

    .nav-menu li:hover .sub-menu,
    .nav-menu li.focus .sub-menu {
        display: block;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .widget-area {
        flex: 0 0 100%;
        margin-left: 0;
        margin-top: 2rem;
    }

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

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* ==========================================================================
   Mobile (767px and below)
   ========================================================================== */

@media (max-width: 767px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 20px;
    }

    .row {
        flex-direction: column;
    }

    .site-header {
        position: relative;
    }

    .top-bar {
        display: none;
    }

    .header-main {
        padding: 1rem 0;
    }

    .site-branding {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .site-logo img,
    .custom-logo {
        max-height: 40px;
    }

    .header-right {
        display: flex;
        align-items: center;
        margin-top: 0;
        gap: 0.5rem;
    }

    .header-search {
        display: none;
    }

    .header-cart .cart-icon .fa {
        font-size: 20px;
    }

    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
    }

    .menu-toggle-icon {
        display: block;
        width: 25px;
        height: 2px;
        background: var(--text-color);
        position: relative;
    }

    .menu-toggle-icon::before,
    .menu-toggle-icon::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        background: var(--text-color);
        left: 0;
    }

    .menu-toggle-icon::before {
        top: -8px;
    }

    .menu-toggle-icon::after {
        bottom: -8px;
    }

    .site-content {
        padding: 2rem 0;
    }

    .footer-widgets-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-navigation {
        margin-top: 1rem;
    }

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

    /* Buttons */
    .btn {
        display: block;
        width: 100%;
    }

    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.875rem; }

    /* Posts */
    .post-thumbnail img {
        width: 100%;
        height: auto;
    }

    .entry-meta {
        font-size: 0.75rem;
    }

    /* Comments */
    .comment-list {
        padding-left: 0;
    }

    .comment-list .children {
        padding-left: 1rem;
    }

    /* Widgets */
    .widget {
        padding: 1rem;
    }

    /* Pagination */
    .pagination {
        font-size: 0.875rem;
    }

    .page-numbers {
        padding: 0.5rem 0.75rem;
    }
}

/* ==========================================================================
   Mobile Small (480px and below)
   ========================================================================== */

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 0 15px;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .site-description {
        display: none;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    abbr[title]::after {
        content: " (" attr(title) ")";
    }

    pre {
        white-space: pre-wrap !important;
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }

    .site-header,
    .site-footer,
    .widget-area,
    .comments-area,
    .mobile-menu-toggle {
        display: none;
    }
}

/* ==========================================================================
   Landscape Orientation
   ========================================================================== */

@media (max-width: 767px) and (orientation: landscape) {
    .site-header {
        position: relative;
    }

    .header-main {
        padding: 0.5rem 0;
    }

    .site-logo img,
    .custom-logo {
        max-height: 35px;
    }
}

/* ==========================================================================
   High Resolution Displays
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* High-res specific styles if needed */
}

/* ==========================================================================
   Accessibility - Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if needed in future */
}
