/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (responsive.css)
   ========================================================================== */
@media (max-width: 1440px) {

  /* Community */
  /* .post-actions::before {
    right: -6px;
  } */
}

/* Laptops & Mid-sized Desktops (1200px to 1400px) */
@media (max-width: 1366px) {
  .container {
    padding: 0 80px;
  }

  .main-grid {
    grid-template-columns: 190px 1fr 190px;
    gap: 18px;
  }

  .chapter-thumb {
    height: 90px;
  }

  .floating-badge-large {
    right: -20px;
  }

  /* community */
  .forum-top-bar {
    flex-direction: column;
  }
}

@media (max-width: 1200px) {
  .news-banner-title {
    font-size: 80px;
  }

  /* Product detail */
  .shop-filter-bar {
    flex-direction: column;
  }

  .shop-search-box {
    min-width: auto;
  }
}

/* Large Tablets & Small Laptops (992px to 1199px) */
@media (max-width: 1199px) {
  .main-grid {
    grid-template-columns: 170px 1fr 170px;
    gap: 15px;
  }

  .chapter-info-box {
    padding: 22px 20px;
  }

  .chapter-main-title {
    font-size: 24px;
  }

  .chapter-thumb {
    height: 80px;
  }

  .chapter-badge {
    font-size: 10px;
    padding: 4px 2px;
  }

  /* Community */
  .floating-badge-large {
    right: -10px;
  }
}

/* Medium Devices (Tablets, less than 992px) */
@media (max-width: 991px) {
  .container {
    padding: 0 50px;
  }

  .main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
  }

  /* Move sidebars below center main section */
  .left-sidebar,
  .right-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .banner-logo-overlay {
    width: 80%;
  }

  .chapter-thumb {
    height: 120px;
  }

  /* News Pages */
  .news-section,
  .shop-section,
  .product-detail-section,
  .cart-section,
  .checkout-section,
  .mprofile-section,
  .ohistory-section,
  .terms-section,
  .fandom-section {
    margin: 0 auto;
  }

  .news-section .center-content {
    order: 1;
  }

  .news-section .left-sidebar {
    order: 2;
  }

  .news-section .right-sidebar {
    order: 3;
  }

  .news-banner-section {
    height: auto;
    padding: 100px 0 50px;
  }

  .news-banner-title {
    font-size: 70px;
  }
  /* Fandom */
  .fandom-bx{
    padding:20px;
  }
  /* Community */
  .forum-top-bar {
    flex-direction: column;
  }

  .community-section {
    margin: 0 auto 50px;
  }

  .community-section .center-content {
    order: 1;
  }

  .community-section .left-sidebar {
    order: 2;
  }

  .community-section .right-sidebar {
    order: 3;
  }

  .floating-badge-large {
    display: none;
  }

  /* Subscription */
  .subscription-section {
    margin: 0 auto 50px;
  }

  .subscription-section .center-content {
    order: 1;
  }

  .subscription-section .left-sidebar {
    order: 2;
  }

  .subscription-section .right-sidebar {
    order: 3;
  }

  .sub-rss-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .btn-rss-trigger {
    width: 100%;
    text-align: center;
  }

  /* Shop & Product Detail */
  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .product-info-box {
    padding-left: 0;
    margin-top: 20px;
  }

  .product-detail-card {
    padding: 30px 25px;
  }

  /* Cart & Checkout */
  .cart-promo-sidebar {
    margin-top: 30px;
  }

  .order-summary-card {
    margin-top: 30px;
  }

  .cart-item-card {
    padding: 12px;
    gap: 12px;
  }

  .cart-item-title {
    font-size: 18px;
  }

  .cart-subtotal-bar {
    padding: 12px 20px;
  }

  .subtotal-label,
  .subtotal-amount {
    font-size: 20px;
  }

  .btn-checkout {
    padding: 12px 20px;
    font-size: 15px;
  }

  .btn-qty {
    width: 30px;
    height: 30px;
  }

  .cart-item-actions {
    gap: 10px;
    justify-content: space-between;
  }

  .cart-item-price {
    min-width: auto;
    font-size: 20px;
  }

  /* Checkout */
  .step-circle {
    width: 60px;
    height: 60px;
  }

  .checkout-content-row {
    flex-direction: column;
  }

  .mprofile-card {
    padding: 30px 20px;
  }
  /* Order History */
  .order-history-header {
    flex-direction: column;
    align-items: center;
  }
  .order-list-content{padding: 30px 15px;}
  /* Terms and Conditions */
  .terms-bx {
    padding: 40px 15px;
  }
  /* News Detail */
  .nd-other-grid {grid-template-columns: repeat(3, 1fr);}
  .nd-article-title {font-size: 22px; }
}

/* Small Devices (Landscape phones, less than 768px) */
@media (max-width: 767px) {
  .container {
    padding: 0 25px;
  }

  .banner-logo-overlay {
    width: 90%;
  }

  .chapter-reader-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .reader-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .left-sidebar,
  .right-sidebar {
    grid-template-columns: 1fr;
  }

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

  .news-top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .news-search-box {
    width: 100%;
    max-width: 100%;
  }

  .news-banner-title {
    font-size: 50px;
  }

  .chapter-info-box {
    padding: 18px 15px;
    border-radius: 14px;
  }

  .chapter-main-title {
    font-size: 22px;
  }

  /* Community */
  .forum-main-title {
    font-size: 22px;
    text-align: center;
  }

  .forum-subtitle {
    font-size: 14px;
  }

  .forum-top-bar {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .forum-tabs-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
  }

  .forum-tabs {
    width: 100%;
    overflow-x: auto;
    gap: 8px;
  }

  .forum-tab {
    padding: 8px 14px;
    font-size: 11px;
    white-space: nowrap;
  }

  .btn-create-new {
    padding: 10px 18px;
    font-size: 11px;
    align-self: center;
  }

  .floating-badge-small {
    display: none;
  }

  .forum-card {
    padding: 20px 20px;
  }

  .post-title {
    font-size: 17px;
  }

  .post-footer {
    align-items: flex-start;
    gap: 12px;
  }

  .post-timestamp {
    align-self: flex-end;
  }
  /* Community popup */
  .community-modal .modal-content {
    padding: 5px 10px;
  }
  .modal-post-title {
    font-size: 18px;
  }
  .comments-count-title {
    font-size: 18px;
  }
  .btn-comment-submit {
    width: 100%;
    text-align: center;
  }

  /* Subscription */
  .subscription-card-box {
    padding: 25px 20px;
    height: auto;
  }

  .sub-heading {
    text-align: center;
    font-size: 24px;
  }

  .sub-cover-wrapper {
    max-width: 100%;
    margin: 0 auto 15px;
  }

  /* Shop & Product Detail */
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .shop-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    margin-bottom: 30px;
  }

  .shop-search-sort {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .shop-search-box {
    min-width: 100%;
    width: 100%;
  }

  .shop-sort-box {
    width: 100%;
  }

  .product-gallery-wrapper {
    flex-direction: column-reverse;
    align-items: center;
    gap: 14px;
  }

  .product-thumbnails {
    flex-direction: row;
    width: 100%;
    justify-content: center;
    gap: 10px;
  }

  .thumb-item {
    width: 75px;
    height: 75px;
    flex-grow: 0;
  }

  .product-main-img-box {
    min-height: 280px;
    max-height: 320px;
    width: 100%;
  }

  .other-products-title {
    font-size: 24px;
  }

  .product-detail-title {
    font-size: 24px;
  }

  .shop-tabs {
    width: fit-content;
    margin: 0 auto;
    text-align: center;
    flex-wrap: nowrap;
    gap: 5px;
  }

  .shop-tab {
    white-space: nowrap;
    padding: 5px;
    font-size: 13px;
  }

  /* Cart & Checkout */
  .cart-item-img {
    width: 100%;
    height: auto;
  }

  .cart-item-card {
    flex-wrap: wrap;
  }

  .cart-item-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .checkout-wizard-steps {
    margin-bottom: 30px;
  }

  .step-line {
    margin-top: -20px;
  }

  /* Manage Profile */
  .mprofile-section .left-sidebar, .mprofile-section .right-sidebar, .ohistory-section .left-sidebar, .ohistory-section .right-sidebar{
    grid-template-columns: repeat(1, 1fr) !important;
  }
  
  /* Order History */
  .order-tab-btn{padding:10px 15px;font-size:14px;}
  .order-item-box{min-width: auto;}
  .order-items-grid{flex-direction: column;}
  .nd-other-grid {grid-template-columns: repeat(2, 1fr); }
  .nd-article-title { font-size: 20px;}
  .nd-article-body { padding: 16px 16px;}
}

/* Extra Small Devices (Portrait phones, less than 576px) */
@media (max-width: 575px) {
  .container {
    padding: 0 15px;
  }

  .hero-banner-section {
    height: auto;
    padding: 150px 0 80px;
  }

  .chapter-thumb {
    height: 100px;
  }

  .chapter-badge {
    font-size: 9px;
  }

  .reader-frame {
    padding: 2px;
    border-radius: 14px;
  }

  .news-banner-title {
    font-size: 32px;
  }

  /* Community */
  .forum-card {
    padding: 16px 15px;
  }

  .post-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-timestamp {
    align-self: flex-start;
  }

  .forum-tabs-wrapper {
    flex-direction: column;
  }

  /* Subscription */
  .subscription-card-box {
    padding: 20px 15px;
  }

  .sub-input-row {
    flex-direction: column;
    padding: 10px;
    border-radius: 16px;
    gap: 10px;
  }

  .sub-email-input {
    text-align: center;
    width: 100%;
    padding: 4px;
  }

  .btn-sub-trigger {
    width: 100%;
    text-align: center;
  }

  .sub-option-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .sub-option-text {
    text-align: center;
  }

  /* Shop & Product Detail */
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-detail-card {
    padding: 20px 15px;
  }

  .product-detail-controls {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 15px;
  }

  .qty-pill-control {
    justify-content: center;
    width: 100%;
  }

  .btn-detail-add-cart {
    justify-content: center;
    width: 100%;
  }

  .thumb-item {
    width: 60px;
    height: 60px;
    border-radius: 10px;
  }

  .product-img,
  .product-img-box {
    border-radius: 12px;
  }

  .news-pagination .page-btn {
    width: 35px;
    height: 35px;
    font-size: 15px;
  }

  /* Cart & Checkout Responsive */
  .cart-top-bar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .cart-title {
    font-size: 28px;
  }

  .cart-subtotal-bar {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    border-radius: 24px;
    padding: 12px 15px;
  }

  .subtotal-label-wrapper {
    justify-content: space-between;
    gap: 15px;
    width: 100%;
  }

  .btn-checkout {
    text-align: center;
  }

  .btn-wizard-action {
    width: 100%;
    padding: 12px 20px;
    text-align: center;
  }

  .checkout-wizard-steps {
    max-width: 100%;
    gap: 0;
  }

  .step-circle {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .step-circle svg {
    width: 16px;
    height: auto;
  }

  .step-label {
    font-size: 12px;
  }

  .checkout-card {
    padding: 18px 15px;
  }

  .checkout-card-title {
    font-size: 18px;
  }

  .order-summary-card {
    padding: 20px 15px;
    margin-top: 25px;
  }

  .cart-promo-sidebar {
    margin-top: 25px;
  }

  .summary-item-img {
    width: 60px;
    height: 60px;
  }

  /* Manage Profile Mobile Adjustments */
  .mprofile-card {
    padding: 22px 18px;
  }

  .mprofile-card-title {
    font-size: 24px;
    margin-bottom: 18px;
  }

  .mprofile-form {
    max-width: 100%;
  }

  .mprofile-input {
    height: 44px;
    font-size: 13px;
  }

  .mprofile-submit-btn {
    padding: 10px 32px;
    font-size: 13px;
  }
  /* Order History */
  .order-history-title{font-size: 24px;}
  .order-item-box, .order-items-grid{
    flex-direction: column;
  }
  .order-item-thumb, .order-items-grid{width: 100%;height: auto;}
  .news-pagination{margin-top: 15px;}
  /* News Detail */
  .nd-other-grid {
    grid-template-columns: 1fr;
  }
  .nd-article-title {
    font-size: 18px;
  }
}