@font-face {
  font-family: "Narnoor";
  src: url("/core/static/fonts/Narnoor-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Narnoor";
  src: url("/core/static/fonts/Narnoor-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Narnoor";
  src: url("/core/static/fonts/Narnoor-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
}

@font-face {
  font-family: "Narnoor";
  src: url("/core/static/fonts/Narnoor-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Narnoor";
  src: url("/core/static/fonts/Narnoor-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

  :root {
    --font-sans: 'Narnoor', Arial, sans-serif;
    --color-bg: #f9f9f9;
    --color-white: #ffffff;
    --color-black: #111111;
    --color-grey-light: #e0e0e0;
    --color-grey: #888888;
    --color-grey-dark: #555555;
    --color-primary: #000000;
    --color-accent: #ffb800;
    --radius: 8px;
    --transition: 0.3s;
  }
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; font-family: var(--font-sans); color: var(--color-black); line-height: 1.4; }
  a { text-decoration: none; color: inherit; }
  button { font-family: var(--font-sans); cursor: pointer; border: none; background: none; }

  /* Header */

  /* Breadcrumb & Main */
  main { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
  .breadcrumb { font-size: 0.875rem; color: var(--color-grey-dark); margin-bottom: 1rem; }

  .product-grid {
      display: grid;
      grid-template-columns: 55% 45%;
      gap: 2rem;
      width: 98%;
      align-items: stretch;
  }
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.5rem;
    max-width: 1200px;
    height: 100%;
  }
  .gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform var(--transition);
  }
  .gallery-grid img:hover {
    transform: scale(1.02);
  }

  /* Modal and Carousel */
  #imageModal {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100vw; height: 100vh;
      background: rgba(0, 0, 0, 0.85);
      z-index: 1000;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 1rem;
  }

  #imageModal .modal-close {
      position: absolute;
      top: 1rem; right: 1rem;
      font-size: 2rem;
      color: #fff;
      cursor: pointer;
      z-index: 1001;
      }
  #imageModal .carousel-container {
      position: relative;
      max-width: 90vw;
      max-height: 90vh;
      overflow: hidden;
      border-radius: var(--radius);
  }
  #imageModal .carousel-slide {
      display: none;
      width: 100%;
      height: 100%;
  }

  #imageModal .carousel-slide.active {
      display: block;
  }

  #imageModal .carousel-slide img {
      width: 100%;
      height: 100%;
      object-fit: contain;
  }

  .prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fff;
    padding: 0 1rem;
    user-select: none;
  }
  .prev { left: 10px; }
  .next { right: 10px; }

  .details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .product-name-subname h1 {
      font-size: 1.75rem;
      margin: 0;
      color: black;
  }
  .product-name-subname p {
      font-size: 1.3rem;
      margin: 0;
      color: var(--color-grey-dark);
  }
  .price {
      margin: 0.25rem 0;
  }
  .original-price{
      font-size:1.5rem;
      text-decoration: line-through;
      color: black;
  }
  .discounted-price{
      font-size: 2.5rem;
      font-weight: bold;
      color: black;
      display: inline-flex;  /* keeps currency & number together on one line */
      align-items: baseline;
  }
  .discounted-price .currency {
    font-size: 0.75em;
    margin-left: 0.3em;
    vertical-align: top;
  }
  /* Container holds two groups side by side */
  .sizes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    width: 100%;
  }

  /* Common heading style */
  .sizes__label {
    font-family: 'Narnoor', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    margin: 1rem 0 0.5rem;
  }

  /* Make each group stack vertically */
  .size-group,
  .quantity-group {
    display: flex;
    flex-direction: column;
  }

  /* Size buttons row */
  .size-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
  }

  /* Individual size button */
  .size-button {
    flex: 0 0 auto;
    padding: 0.4rem 2rem 0.7rem 2rem;
    border-radius: 3rem;
    background: none;
    border: 1px solid;
    transition: background var(--transition), color var(--transition);
    font-family: 'Narnoor', sans-serif;
    font-size: 1rem;
  }

  /* Quantity selector row */
  .quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  /* Quantity buttons */
  .quantity-button {
    padding: 0.4rem 2rem 0.7rem 2rem;
    border-radius: 3rem;
    background: var(--color-white);
    transition: background var(--transition), color var(--transition);
    font-family: 'Narnoor', sans-serif;
    font-size: 1rem;
  }
  /* .quantity-selector {
      display: flex;
      align-items: center;
      gap: 0.5rem;
  }
  .quantity-button {
      padding: 1rem 2rem;
      border-radius: 3rem;
      background: var(--color-white);
      transition: background var(--transition), color var(--transition);
  } */
  .quantity-button:hover {
      background-color: var(--color-grey-dark);
      color: var(--color-white);
  }
  .sizes button.active { background: var(--color-primary); color: var(--color-white); }
  .btn-add { margin-top: 1rem; padding: 0.75rem; background: var(--color-primary); color: var(--color-white); border-radius: var(--radius); font-size: 1rem; transition: background var(--transition); }
  .btn-add:hover { background: var(--color-grey-dark); }

  .section {
      height: 40%;
      background: var(--color-white); 
      padding: 1rem; 
      border-radius: var(--radius);
  }
  .shipping-card {
      background: #fff;
      overflow: hidden;
  }
  .shipping-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0px 20px;
      cursor: pointer;
  }
  .shipping-header h3 {
      font-size: 1.1rem;
      font-weight: 500;
  }
  .toggle-icon {
      font-size: 0.9rem;
      transition: transform 0.2s;
      }
  .shipping-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      padding: 16px 20px 24px;
  }
  .shipping-item {
      display: flex;
      align-items: center;
      gap: 12px;
  }
  .icon-circle {
      flex-shrink: 0;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: #f5f5f5;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
  }
  .text-block .label {
      font-size: 0.75rem;
      color: #888;
  }
  .text-block .value {
      font-size: 0.95rem;
      font-weight: 500;
      color: #333;
  }

  /* Ratings & Feedback */
  .feedback-section { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 2rem 0; }
  .ratings { display: flex; align-items: center; gap: 1rem; }
  .avg-score {
    font-size: xxx-large;
    font-weight: bold;
    display: flex;
    align-items: center;
  }
  .avg-scale {
    font-size: large;
    margin-left: 0.25rem;
    margin-bottom: 0.25em;
    font-weight: normal;
    color: gray;
    align-self: flex-end;
  }
  .avg-label {
      font-size: 1rem;
      font-weight: 500;
      margin-bottom: 0.25rem;
      text-transform: uppercase;
  }
  .stars-graph { flex: 1; }
  .stars-graph .bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: default; /* show pointer on hover for tooltip */
  }
  .stars-graph .bar span {
    display: inline-block;
    height: 10px;
    border-radius: 5px;
    background: var(--color-accent);
  }
  .feedback-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 16rem;
    overflow-y: auto;
    padding-right: 0.5rem;
  }
  .feedback-card { background: var(--color-white); padding: 1rem; border: 1px solid var(--color-grey-light); border-radius: var(--radius); min-height: 120px; margin-bottom: 1rem; }
  .feedback-list::-webkit-scrollbar {
    width: 6px;
  }
  .feedback-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
  }
  .feedback-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
  }

  /* Recommendations */
  .recommendations { margin: 2rem 0; }
  .recommendations h2 { font-size: 1.5rem; margin-bottom: 1rem; }
  .rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
  .rec-card { background: var(--color-white); padding: 1rem; border-radius: var(--radius); text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
  .rec-card h3 { font-size: 1rem; margin: 0.5rem 0; }
  .rec-card .price { color: var(--color-primary); font-size: 1.125rem; margin-top: 0.25rem; }
  .product-actions {
      display: flex;
      gap: 12px;
      margin-top: 20px;
      }
  
  .product-actions > form#add-to-cart-form {
    flex: 1;
    display: flex;
  }
  
  .product-actions > form#add-to-cart-form .btn-add {
    flex: 1;
    margin-top: 1rem;
  }

  .product-actions > form#buy-now-form{
    flex: 1;
    display: flex;
  }
  
  .product-actions > form#buy-now-form .btn-buy {
    flex: 1;
    margin-top: 1rem;
  }

  .product-actions .btn-add {
      flex: 1;
      margin-top: 1rem;
      padding: 0.75rem;
      background: #0e9453;
      color: var(--color-white);
      border-radius: 99999px;
      font-size: 1.3rem;
      font-weight: bold;
      transition: background var(--transition);
      cursor: pointer;
  }

  .product-actions .btn-buy {
      flex: 1;
      margin-top: 1rem;
      padding: 0.75rem;
      background: #fe6533;
      color: var(--color-white);
      border-radius: 99999px;
      font-size: 1.3rem;
      font-weight: bold;
      transition: background var(--transition);
      cursor: pointer;
  }
  .product-actions .btn-add,
  .product-actions .btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  hr {
      border-top: 1px solid #dfdfdf;
      margin: 0;
  }
  .description-section {
      max-height: 250px;
      overflow-y: auto;
      padding-right: 0.5rem;
      scroll-behavior: smooth;
  }
  .description__icon {
    width: 30px;
    height: 20px;
  }
  .scrollable {
    /* max-height: 200px; */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5em;
  }
  .scrollable:-webkit-scrollbar {
    width: 6px;
  }
  .scrollable::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
  }
  .scrollable::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
  }

  /* Product Grid */
  .similar-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    justify-content: center;
    padding: 2rem 0;
    max-width: 100%;
  }
  
    /* Max 5 columns */
  @media (min-width: 1200px) {
    .similar-product-grid {
      grid-template-columns: repeat(5, 1fr);
    }
  }
  
  @media (max-width: 1199px) and (min-width: 992px) {
    .similar-product-grid {
      grid-template-columns: repeat(4, 1fr);
    }
  }
  
  @media (max-width: 991px) and (min-width: 768px) {
    .similar-product-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  
  @media (max-width: 767px) {
    .similar-product-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 480px) {
    .similar-product-grid {
      grid-template-columns: 1fr;
    }
  }

