/* RESET */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family: Arial, Helvetica, sans-serif;
}

/* HEADER */
.header{
  position:fixed;
  top:0;
  width:100%;
  background:white;
   border-bottom:2px solid #eee;
  transition:0.3s ease;
  z-index:1000;
}

body.scrolled .header{
  background:#fff;
  border-bottom:1px solid #eee;
}

/* HEADER ROW */
.header-row{
  height:72px;
  padding:0 40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  position:relative;
}

/* RESET HEADER LINKS */
.menu-link{
  text-decoration:none;
  color:#111;
  font-size:13px;
  letter-spacing:2px;
  padding:4px 0;
  position:relative;
}

/* H&M STYLE UNDERLINE */
.menu-link::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-6px;
  width:0;
  height:1px;
  background:#111;
  transition:0.25s ease;
}

.menu-link:hover::after{
  width:100%;
}

/* REMOVE VISITED COLOR */
.menu-link:visited{
  color:#111;
}

/* LOGO */
.logo{
  font-size:22px;
  letter-spacing:5px;
  font-weight:500;
}

/* CENTER LOGO */
.logo-center{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
}

/* RIGHT LOGO */
.logo-right{
  position:absolute;
  left:10%;
  transform:translateX(-50%);
}

/* LEFT LOGO */
.logo-left{
  display:none;
}

/* AFTER SCROLL */
body.scrolled .logo-center{
  display:none;
}

body.scrolled .logo-right{
  display:none;
}

body.scrolled .logo-left{
  display:inline;
}

/* LEFT */
.left{
  display:flex;
  align-items:center;
}

/* MENU */
.menu{
  display:none;
  gap:28px;
  margin-left:32px;
}

.menu-link{
  font-size:13px;
  letter-spacing:2px;
  cursor:pointer;
}

/* SHOW MENU AFTER SCROLL */
body.scrolled .menu{
  display:flex;
}

/* RIGHT */
.right{
  display:flex;
  align-items:center;
  gap:16px;
}

.search{
  padding:8px 16px;
  border-radius:20px;
  border:1px solid #ccc;
}

/* MEGA MENU BASE */
.mega{
  position:fixed;
  top:72px;
  width:100%;
  background:#fff;
  border-bottom:1px solid #eee;
  display:none;
  z-index:900;
}

.mega.show{
  display:block;
}

.mega-panel{
  display:none;
}

.mega-panel.active{
  display:block;
}

.mega-inner{
  max-width:1200px;
  margin:0 auto;
  padding:40px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:60px;
}

.mega h4{
  font-size:14px;
  margin-bottom:14px;
  letter-spacing:1.5px;
}

.mega a{
  display:block;
  margin-bottom:10px;
  color:#333;
  text-decoration:none;
}

.mega a:hover{
  text-decoration:underline;
}

.mega.show{
  display:block;
}

.mega-inner{
  max-width:1200px;
  margin:0 auto;
  padding:40px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:60px;
}

.mega h4{
  margin-bottom:14px;
  font-size:14px;
  letter-spacing:1.5px;
}

.mega a{
  display:block;
  margin-bottom:10px;
  text-decoration:none;
  color:#333;
}

/* OVERLAY */
.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  opacity:0;
  pointer-events:none;
  transition:0.3s ease;
  z-index:900;
}

.overlay.active{
  opacity:1;
  pointer-events:auto;
}

/* SIDE MENU */
.side-menu{
  position:fixed;
  top:120px; /* below header + nav */
  left:-420px;
  width:520px;
  height:calc(100vh - 120px);
  background:#fff;
  padding:56px 48px;
  transition:left 0.4s ease;
  z-index:1000;
  box-shadow:20px 0 40px rgba(0,0,0,0.08);
}

.side-menu.active{
  left:0;
}

/* SIDE CONTENT */
.side-content h3{
  font-size:26px;
  margin-bottom:24px;
}

.side-content a{
  display:block;
  font-size:17px;
  margin-bottom:14px;
  text-decoration:none;
  color:#111;
}

.side-content a:hover{
  text-decoration:underline;
}

.mega a{
  display:block;
  margin-bottom:10px;
  color:#111;           /* dark text */
  text-decoration:none; /* remove underline */
  font-size:14px;
  font-weight:500;
}

.mega a:visited{
  color:#111;
}

.mega a:hover{
  text-decoration:underline;
}

.menu-preview{
width:200px;
margin-left:40px;
}

.menu-preview img{
width:100%;
height:auto;
object-fit:cover;
}

/* ================================
   ROOT
================================ */
:root{
  --header-height: 64px;
}

/* ====================================
   TOOLBAR (SORT + FILTER)
==================================== */
.hm-toolbar{
  position:sticky;
  top:var(--header-height);
  background:#fff;
  padding:15px 40px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid #eee;
  z-index:90;
}

.hm-sort-btn,
.hm-filter-btn,
.sort-btn{
  background:none;
  border:none;
  font-size:14px;
  letter-spacing:1px;
  cursor:pointer;
  color:#111;
}

/* SORT DROPDOWN */
.sort-wrapper{
  position:relative;
}

.sort-dropdown{
  position:absolute;
  top:120%;
  left:0;
  min-width:200px;
  background:#fff;
  border:1px solid #e5e5e5;
  display:none;
  z-index:100;
}

.sort-dropdown button{
  width:100%;
  padding:12px 14px;
  background:none;
  border:none;
  text-align:left;
  cursor:pointer;
  font-size:13px;
}

.sort-dropdown button:hover{
  background:#f5f5f5;
}

.sort-dropdown.show{
  display:block;
}

/* ================================
   FILTER OVERLAY
================================ */
.filter-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.45);

  opacity:0;
  pointer-events:none;
  transition:0.35s ease;

  z-index:95;
}

.filter-overlay.show{
  opacity:1;
  pointer-events:auto;
}

.hm-toolbar{
  transition:transform 0.2s ease;
}

.hm-toolbar.hide{
  transform:translateY(-100%);
}

/* ================================
   FILTER DRAWER (H&M STYLE)
================================ */
.filter-drawer{
  position:fixed;
  top: var(--header-height);              /* ALWAYS below header */
  right:0;

  width:360px;
  height: calc(100vh - var(--header-height));

  background:#fff;
  transform:translateX(100%);
  transition:transform 0.4s ease;

  z-index:96;
  display:flex;
  flex-direction:column;
}

.filter-drawer.open{
  transform:translateX(0);
}

/* ================================
   FILTER HEADER
================================ */
.filter-header{
  display:flex;
  justify-content:space-between;
  align-items:center;

  padding:18px 20px;
  border-bottom:1px solid #e5e5e5;
}

.filter-header h3{
  font-size:16px;
  font-weight:500;
}

.filter-header button{
  background:none;
  border:none;
  font-size:18px;
  cursor:pointer;
}

/* ================================
   FILTER CONTENT
================================ */
.filter-content{
  padding:20px;
  overflow-y:auto;
}

/* ================================
   FILTER GROUPS
================================ */
.filter-group{
  margin-bottom:28px;
}

.filter-group h4{
  font-size:14px;
  font-weight:500;
  margin-bottom:10px;
}

/* ================================
   PRICE RANGE
================================ */
.price-values{
  display:flex;
  justify-content:space-between;
  font-size:13px;
  margin-bottom:8px;
}

.filter-group input[type="range"]{
  width:100%;
}

/* ================================
   SIZE OPTIONS
================================ */
.size-row{
  display:flex;
  gap:10px;
}

.size-row button{
  padding:6px 12px;
  border:1px solid #ccc;
  background:none;
  cursor:pointer;
  font-size:13px;
}

/* ================================
   COLOR OPTIONS
================================ */
.color-row{
  display:flex;
  gap:10px;
}

.color-row span{
  width:18px;
  height:18px;
  border-radius:50%;
  border:1px solid #ccc;
  cursor:pointer;
}

/* ================================
   CHECKBOX / FIT
================================ */
.filter-group label{
  display:block;
  font-size:13px;
  margin-bottom:6px;
  cursor:pointer;
}

/* ================================
   FILTER ACTION BUTTONS
================================ */
.filter-actions{
  display:flex;
  gap:12px;
  padding:16px 20px;
  border-top:1px solid #e5e5e5;
}

.filter-actions button{
  flex:1;
  padding:12px 0;
  font-size:14px;
  cursor:pointer;
  border:1px solid #111;
}

.filter-cancel{
  background:#fff;
  color:#111;
}

.filter-apply{
  background:#111;
  color:#fff;
}

/* ===============================
   ACCORDION FILTER
=============================== */

.filter-title{
display:flex;
justify-content:space-between;
align-items:center;
cursor:pointer;
font-size:14px;
margin-bottom:10px;
}

.filter-options{
display:none;
}

.filter-group.active .filter-options{
display:block;
}

.filter-arrow{
transition:0.3s;
}

.filter-group.active .filter-arrow{
transform:rotate(90deg);
}

/* ================================
   MOBILE FIX
================================ */
@media(max-width:768px){
  :root{
    --header-height:56px;
  }

  .hm-toolbar{
    padding:12px 20px;
  }

  .filter-drawer{
    width:100%;
  }
}

/* =========================
   PRODUCTS SECTION
========================= */

.products-section{
  padding:40px 60px;
  margin-top:40px;
}

/* =========================
   PRODUCT GRID
========================= */

.products-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:40px 25px;
}


/* =========================
   PRODUCT CARD
========================= */

.product-card{
    width:100%;
    cursor:pointer;
    transition:transform 0.25s ease;
}

.product-card:hover{
    transform:translateY(-4px);
}


/* =========================
   PRODUCT IMAGE
========================= */

.product-image{
    width:100%;
    aspect-ratio:3/4;
    background:#f5f5f5;
    overflow:hidden;
}

.product-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}


/* =========================
   PRODUCT INFO
========================= */

.product-info{
    margin-top:12px;
}

.product-name{
    font-size:14px;
    letter-spacing:0.4px;
}

.product-price{
    margin-top:6px;
    font-size:13px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width:1100px){

    .products-grid{
        grid-template-columns:repeat(3,1fr);
    }

}

@media (max-width:768px){

    .products-grid{
        grid-template-columns:repeat(2,1fr);
    }

}

@media (max-width:480px){

    .products-section{
        padding:30px 20px;
    }

    .products-grid{
        grid-template-columns:repeat(2,1fr);
        gap:30px 15px;
    }

}


/* ================= PAGINATION ================= */

.pagination-section{
  text-align:center;
  margin:80px 0;
}

.load-more-btn{
  background:#000;
  color:#fff;
  border:none;
  padding:16px 60px;
  font-size:14px;
  letter-spacing:1px;
  cursor:pointer;
  margin-bottom:30px;
}

.load-more-btn:hover{
  opacity:0.9;
}

.pagination{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:25px;
  font-size:14px;
}

.page-number{
  cursor:pointer;
  color:#888;
}

.page-number.active{
  color:#000;
  font-weight:600;
}

.page-arrow{
  cursor:pointer;
  font-size:18px;
}

.hidden{
display:none;
}

/* PAGINATION VISIBILITY */

.product-card{
display:none;
}

.product-card.active{
display:block;
}

.pagination{
display:flex;
justify-content:center;
align-items:center;
gap:25px;
margin-top:20px;
}

.page-number{
cursor:pointer;
color:#888;
}

.page-number.active{
color:#000;
font-weight:600;
}

.page-arrow{
cursor:pointer;
font-size:18px;
}

.pagination{
display:flex;
justify-content:center;
align-items:center;
gap:25px;
margin-top:20px;
}

#pageNumbers{
display:flex;
gap:20px;
}

.page-number{
cursor:pointer;
color:#888;
}

.page-number.active{
color:#000;
font-weight:600;
}

.page-arrow{
background:none;
border:none;
cursor:pointer;
font-size:18px;
}