/*
Theme Name: Nu Finish
Theme URI: https://nufinish.com
Author: RC Dahal
Author URI: https://nufinish.com
Description: A custom WordPress theme for Nu Finish car care products.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nu-finish
*/

/* Import the main styles from our previously created CSS file */
@import url('assets/css/style.css');

/* WordPress specific styles */
.screen-reader-text {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0;
    border: 0;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Entry content styles */
.entry-content {
    margin-bottom: 2rem;
}

.entry-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.entry-content h2 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
}

.entry-content h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

.entry-content ul, .entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry-content ul li, .entry-content ol li {
    margin-bottom: 0.5rem;
}

/* Comments */
.comments-area {
    margin: 3rem 0;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
}

.comment-author cite {
    font-style: normal;
    font-weight: 600;
}

.comment-metadata {
    font-size: 0.9rem;
    color: #666;
}

.comment-content {
    margin-top: 1rem;
}

.comment-reply-link {
    display: inline-block;
    background-color: #ff5e00;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.comment-reply-link:hover {
    background-color: #e65100;
}

/* Pagination */
.page-numbers {
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
}

.page-numbers.current {
    background-color: #ff5e00;
    color: white;
    border-color: #ff5e00;
}

.page-numbers:hover:not(.current) {
    background-color: #f8f9fa;
}

/* WooCommerce specific styles (if applicable) */

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
}

.woocommerce ul.products li.product {
    border: 1px solid #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.woocommerce ul.products li.product .price {
    color: #ff5e00;
    font-weight: 700;
    margin-bottom: 1rem;
}

.woocommerce ul.products li.product .button {
    background-color: #ff5e00;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.woocommerce ul.products li.product .button:hover {
    background-color: #e65100;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .entry-content h2 {
        font-size: 1.75rem;
    }
    
    .entry-content h3 {
        font-size: 1.25rem;
    }
    
    .comment-author {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-author img {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Skip link styles */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only text */
.screen-reader-text, .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
*:focus {
    outline: 0 !important;
    outline-offset: 2px;
}

.see-all-btn{
	background-color: #c44100 !important;
    border-color: #c44100 !important;
    color: #ffffff !important;
}

.FeedLayout__root {
    box-sizing: border-box;
    width: 100% !important;
}


/* 1. Force flex layout to allow overlapping (override plugin's grid) */
.spotlight-instagram-feed .FeedGridLayout__grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
  grid-template-columns: unset !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 2. Standardize each cell size (based on 1280px container ÷ 6) */
.spotlight-instagram-feed .FeedGridLayout__cell {
  position: relative !important;
  width: 213px !important;       /* ≈ 1280 / 6 */
  height: 213px !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* 3. Fill content to cell edges */
.spotlight-instagram-feed .FeedGridLayout__cell-content,
.spotlight-instagram-feed .FeedGridLayout__media-container,
.spotlight-instagram-feed .MediaTile__root,
.spotlight-instagram-feed .MediaThumbnail__root {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

.spotlight-instagram-feed .MediaThumbnail__image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* 4. Hide video/carousel icons */
.spotlight-instagram-feed .MediaTile__type-icon {
  display: none !important;
}

/* 5. Horizontal cascade: every item after 1st overlaps by 10px */
.spotlight-instagram-feed .FeedGridLayout__cell:not(:first-child) {
  margin-left: -10px !important;
}

/* 6. LIFT ONLY 2nd, 4th, and 6th items by 2rem */
.spotlight-instagram-feed .FeedGridLayout__cell:nth-child(2),
.spotlight-instagram-feed .FeedGridLayout__cell:nth-child(4),
.spotlight-instagram-feed .FeedGridLayout__cell:nth-child(6) {
  transform: translateY(-2rem) !important;
  z-index: 3 !important; /* Ensure they appear on top */
}
/* Sequential stacking: each item on top of the previous */
.spotlight-instagram-feed .FeedGridLayout__cell:nth-child(1) { z-index: 1 !important; }
.spotlight-instagram-feed .FeedGridLayout__cell:nth-child(2) { z-index: 2 !important; }
.spotlight-instagram-feed .FeedGridLayout__cell:nth-child(3) { z-index: 3 !important; }
.spotlight-instagram-feed .FeedGridLayout__cell:nth-child(4) { z-index: 4 !important; }
.spotlight-instagram-feed .FeedGridLayout__cell:nth-child(5) { z-index: 5 !important; }
.spotlight-instagram-feed .FeedGridLayout__cell:nth-child(6) { z-index: 6 !important; }


.spotlight-instagram-feed .FeedGridLayout__cell:nth-child(2n) .MediaThumbnail__root {
  padding-left: 1rem;
    padding-bottom: 1rem;
    background: #ffffff;
}

/* === Mobile: Enable smooth horizontal scroll (≤768px) === */
@media (max-width: 768px) {
  /* Make container scrollable */
  .FeedLayout__root {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important; /* iOS momentum scroll */
    scroll-behavior: smooth !important;
    -ms-overflow-style: none !important;          /* Hide scrollbar in IE/Edge */
    scrollbar-width: none !important;             /* Hide scrollbar in Firefox */
  }

  /* Hide scrollbar in Chrome, Safari, Edge */
  .FeedLayout__root::-webkit-scrollbar {
    display: none !important;
  }

  /* Cells: fixed height, flexible width */
  .spotlight-instagram-feed .FeedGridLayout__cell {
    flex: 0 0 auto !important;   /* Prevent shrinking */
    width: 60vw !important;      /* Approx 1.5 items visible */
    height: 200px !important;    /* Fixed height */
    margin-left: -10px !important; /* Maintain slight overlap */
    transform: none !important;  /* Remove desktop lift for mobile */
  }

  /* Images inside cells: fill perfectly */
  .spotlight-instagram-feed .FeedGridLayout__cell-content,
  .spotlight-instagram-feed .FeedGridLayout__media-container,
  .spotlight-instagram-feed .MediaTile__root,
  .spotlight-instagram-feed .MediaThumbnail__root {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
  }

  .spotlight-instagram-feed .MediaThumbnail__image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  /* Optional: reduce padding for alternating items */
  .spotlight-instagram-feed .FeedGridLayout__cell:nth-child(2n) .MediaThumbnail__root {
    padding-left: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
}

/* Very small screens: ≤480px */
@media (max-width: 480px) {
  .spotlight-instagram-feed .FeedGridLayout__cell {
    width: 33.33vw !important;
    height: 200px !important;
    margin-left: -8px !important;
  }

  .spotlight-instagram-feed .FeedGridLayout__cell:nth-child(2n) .MediaThumbnail__root {
    padding-left: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
}


.MediaTile__overlay{position:absolute;bottom:3rem !important;right:.9rem !important}
