body, html {
  margin: 0;
  padding: 0;
  padding-left: 20px;
  height: 100%;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10pt;
  cursor: url('CURSORTCPB.png'), auto;
}

#imagediv::-webkit-scrollbar {
  width: 6px;
}

#imagediv::-webkit-scrollbar-track {
  background: white
}

#imagediv::-webkit-scrollbar-thumb {
  background: black;
  min-height: 6px;
  background-clip: content-box;
}

#imagediv::-webkit-scrollbar-thumb:hover {
  background: yellow;
}

#descriptiondiv a {
  color: inherit;
  text-decoration: none;
}

#descriptiondiv a:hover {
  text-decoration: overline;
}

#descriptiondiv a {
  color: inherit;
  text-decoration: none;
}

#descriptiondiv a:hover {
  text-decoration: overline;
}

#logo {
  width: 120px;
  height: auto;   
  align-items: center;
  transition: width 0.3s;
}

#logo:hover {
  width: 130px;
  cursor: url('CURSORTCPYELLO.png'), auto;
}

#maindiv {
  display: flex;
  height: 100vh;

}


#navdiv {
  width: 50vw;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
}


#topnav {
  display: flex;
  align-items: flex-start;
  flex: 1;
}

#logodiv {
  flex: 1.3;
  padding: 20px;
  box-sizing: border-box;
  align-content: center;
  justify-content: center;
  text-align: center;
  position: relative;
}


#logodiv.centered {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;

}



#colldiv, #typediv, #photodiv {
  flex: 1;
  padding: 20px;
  box-sizing: border-box;
  align-content: center;
  justify-content: center;
  text-align: left;
  visibility: hidden;
}

p:hover {
  text-decoration: overline;
  cursor: url('CURSORTCPYELLO.png'), auto;
}

#descp:hover {
  text-decoration: none;
}


#descriptiondiv {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: calc(100vh / 2 - 40px);
  visibility: hidden;
  justify-content: flex-end; 
}

#descriptiondiv.align-top {
  justify-content: flex-start;
}

#descwrapper {
  width: 100%;
}


#descriptiondiv::-webkit-scrollbar {
  width: 6px;
}

#descriptiondiv::-webkit-scrollbar-track {
  background: white
}

#descriptiondiv::-webkit-scrollbar-thumb {
  background: black;
  min-height: 6px;
  background-clip: content-box;
}

#descriptiondiv::-webkit-scrollbar-thumb:hover {
  background: yellow;
}

#descp {
  width: 100%;
  overflow-wrap: break-word;
}


#imagediv {
  margin-left: 50vw;
  width: 50vw;
  height: 100vh;
  overflow-y: scroll;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  visibility: hidden;
}


.modal-nav-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  color: yellow;
  cursor: url('CURSORTCPYELLO.png'), auto;
  user-select: none;
  z-index: 1001;
  transition: opacity 0.3s;
  display: none;
}

.modal-nav-arrows:hover {
  opacity: 1;
}

.modal-prev-arrow {
  left: -10vw;
}

.modal-next-arrow {
  right: -10vw;
}


#imagediv img {
  max-width: 100%;
  margin-bottom: 20px;
  align-items: center;
  cursor: url('CURSORTCPYELLO.png'), auto;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
}

.modal-content img {
  max-width: 75vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.custom-arrow {
  width: 25px !important;
  height: auto !important;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: url('CURSORTCPYELLO.png'), auto;
  user-select: none;
  z-index: 1001;
  display: none;
  mix-blend-mode:difference;
}


.modal-prev-arrow {
  left: calc(50% - 42vw); 
}

.modal-next-arrow {
  right: calc(50% - 42vw);
}



.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  visibility: hidden;
  cursor: url('CURSORTCPYELLO.png'), auto;
}

.close:hover {
  color: #bbb;
}

.modal-prev-arrow::after { content: '⟵'; }
.modal-next-arrow::after { content: '⟶'; }


.nav-hidden #colldiv,
.nav-hidden #typediv,
.nav-hidden #photodiv {
  visibility: hidden;
}

#imagediv .product-card {
  border: 1px solid black;
  padding: 10px;
  max-width: 220px;
  text-align: center;
  margin-bottom: 20px;
}

#imagediv .product-card img {
  max-width: 100%;
  height: auto;
}



#cartDrawer.open {
  right: 0;
}

#cartOverlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.3);
  display: none;
  z-index: 9998;
}

#typediv-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 50px; /* adjust this value to control horizontal spacing */
}

#typediv p {
  white-space: nowrap; /* no line break */
}

#cartBtn {
  font-weight: bold;
  cursor: pointer;
}

#colldiv {
  min-width: 295px; /* Adjust as needed */
}

/* make the drawer itself scrollable */
#cartDrawer {
  position: fixed;
  top: 0;
  right: -400px;    /* closed by default */
  width: 300px;
  height: 100vh;
  overflow-y: auto; /* ← here */
  background: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  padding: 20px;
  transition: right 0.3s;
  z-index: 999;
}
#cartDrawer.open {
  right: 0;        /* when you toggle the “open” class */
}

/* 1) All “pointer” elements get your black‑logo cursor */
button,
a,
[role="button"],
.clickable,
*[style*="cursor: pointer"] {
  cursor: url("CURSORTCPB.png"), auto !important;
}

/* 2) On hover (every time), swap to your yellow‑logo cursor */
button:hover,
a:hover,
[role="button"]:hover,
.clickable:hover,
*[style*="cursor: pointer"]:hover {
  cursor: url("CURSORTCPYELLO.png"), auto !important;
}

#mobilelogo {
  display: none;
  visibility: hidden; /* Add this to ensure it's fully hidden initially */
}

/* turn off hover‑overlines inside the product description */
#descriptiondiv p:hover {
  text-decoration: none !important;
}

#navdiv {
  transition: width 0.3s ease;
}

#imagediv {
  transition: margin-left 0.3s ease, width 0.3s ease, height 0.3s ease, flex-direction 0.3s ease;
}

#colldiv {
  transition: min-width 0.3s ease, padding 0.3s ease, gap 0.3s ease;
}

#typediv {
  transition: padding 0.3s ease, gap 0.3s ease;
}

#photodiv {
  transition: padding 0.3s ease, gap 0.3s ease;
}

#colldiv p, #typediv p, #photodiv p {
  transition: font-size 0.3s ease, line-height 0.3s ease;
}

#logo {
  transition: width 0.3s ease;
}

#maindiv {
  transition: border-width 0.3s ease, flex-direction 0.3s ease;
}

#topnav {
  transition: padding 0.3s ease, justify-content 0.3s ease;
}

#logodiv {
  transition: padding 0.3s ease, text-align 0.3s ease;
}

#descriptiondiv {
  transition: padding 0.3s ease, min-height 0.3s ease, max-height 0.3s ease, overflow 0.3s ease;
}

#descp {
  transition: font-size 0.3s ease, max-width 0.3s ease;
}

body, html {
  transition: padding-left 0.3s ease, font-size 0.3s ease;
}

/* Mobile Responsive Styles - Add these to your existing CSS */

/* Intermediate screen sizes - prevent overlay before mobile */
@media screen and (max-width: 1200px) and (min-width: 769px) {
  #navdiv {
    width: 40vw; /* Reduce nav width to prevent overlay */
  }
  
  #imagediv {
    margin-left: 45vw;
    width: 55vw;
  }
  
  #colldiv {
    min-width: 100px; /* Start reducing colldiv width */
  }
  #logo {
    width: 40px;
  } 
}

@media screen and (max-width: 1000px) and (min-width: 769px) {
  #navdiv {
    width: 35vw; /* Further reduce nav width */
  }
  
  #imagediv {
    margin-left: 40vw;
    width: 60vw;
  }
  
  #colldiv {
    min-width: 80px; /* Further reduce colldiv width */
  }
}

@media screen and (max-width: 900px) and (min-width: 769px) {
  #navdiv {
    width: 30vw; /* Even smaller nav width */
  }
  
  #imagediv {
    margin-left: 35vw;
    width: 65vw;
  }
  
  #colldiv {
    min-width: 60px; /* Even narrower colldiv */
  }
  
  /* Make navigation text smaller to fit better */
  #colldiv p, #typediv p, #photodiv p {
    font-size: 9pt;
  }
  
  #logo {
    width: 40px;
  }
  
  #logo:hover {
    width: 50px;
  }
}

@media screen and (max-width: 768px) {
  
  /* Reset main layout for mobile */
  #maindiv {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Remove the extra height, let content determine it */
    height: auto; /* Allow natural height growth */
  } 


  #colldiv {
    min-width: 60px; /* Even narrower colldiv */
  }
  /* Navigation becomes first row */
  #navdiv {
    width: 100vw;
    height: auto;
    position: static;
    flex: 0 0 auto; /* Don't grow or shrink, natural size */
  }

  #topnav {
    flex-direction: row;
    align-items: flex-start;
    height: auto;
    padding: 10px;
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  /* Logo positioning for mobile - FIXED: Only apply when NOT centered */
  #logodiv:not(.centered) {
    position: static;
    transform: none;
    flex: 0 0 auto;
    padding: 10px;
    text-align: left;
    justify-content: left;
  }

  /* IMPORTANT: Preserve centered state on mobile */
  #logodiv.centered {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1000 !important;
    /* Override mobile styles when centered */
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    text-align: center !important;
  }

  #logo {
    width: 30px;
  }

  #logo:hover {
    width: 35px;
  }

  /* CRITICAL FIX: Navigation items should REMAIN HIDDEN initially on mobile 
     The JavaScript will make them visible after logo click */
  #colldiv, #typediv, #photodiv {
    /* DO NOT set visibility: visible here - let JS control it */
    padding: 3px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    min-width: 0;
  }

  

  /* ONLY apply mobile styling when these elements are actually visible */
  #colldiv[style*="visibility: visible"], 
  #typediv[style*="visibility: visible"], 
  #photodiv[style*="visibility: visible"] {
    /* Mobile-specific styling only when visible */
  }

  #colldiv p, #typediv p, #photodiv p {
    margin: 0;
    white-space: normal;
    font-size: 9pt;
    line-height: 1.1;
  }

  #photodiv p {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100%;
  }

  #mobilelogo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    width: 100%;
    visibility: hidden; /* Keep hidden until after landing sequence */
  }

  #mobilelogo.show {
    visibility: visible; /* Only show when .show class is added */
  }

  #logodiv-mobile {
    text-align: center;
  }

  #logo-mobile {
    width: 50px;
    transition: width 0.3s ease;
    cursor: url('CURSORTCPB.png'), auto;
  }

  #logo-mobile:hover {
    width: 55px; /* Fixed hover size */
    cursor: url('CURSORTCPYELLO.png'), auto;
  }

  /* Hide original #logodiv only on mobile if not centered */
  #topnav #logodiv:not(.centered) {
    display: none;
  }
  

  /* Image div - MODIFIED to use flexible height */
  #imagediv {
    margin-left: 0;
    width: 100vw;
    /* CHANGED: Use flexible height instead of fixed 50vh */
    min-height: 30vh; /* Minimum height */
    max-height: 50vh; /* Maximum height */
    flex: 2; /* Takes more space than description */
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px;
    display: flex;
     margin-bottom: 150px; /* Extra space at bottom of image gallery */
    padding-bottom: 40px; 
    flex-direction: row;
    align-items: flex-start;
    gap: 7px;
    /* DO NOT set visibility: visible - let JS control it */
  }
 #imagediv::after {
    content: '';
    display: block;
    height: 100px; /* Extra scroll space */
    width: 100%;
  }
  /* Description div - MODIFIED to use flexible height */
  #descriptiondiv {
    width: 92.5vw;
    /* CHANGED: Use flexible height instead of fixed height */
    min-height: 15vh; /* Minimum height */
    max-height: 25vh; /* Maximum height when content is long */
    padding: 15px;
    /* DO NOT set visibility: visible - let JS control it */
    flex: 1; /* Takes remaining space */
    justify-content: flex-start;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto; /* Allow scrolling if content is too long */
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
  }

  /* Images in horizontal scroll */
  #imagediv img {
    max-width: none;
    width: auto;
    /* CHANGED: Make height flexible based on container */
    height: calc(100% - 30px); /* Subtract padding */
    min-height: 200px; /* Minimum image height */
    max-height: calc(60vh - 60px); /* Maximum based on container max-height */
    margin-bottom: 80px; /* Extra space at bottom of image gallery */
    padding-bottom: 20px; /* Additional padding */
    margin-right: 7px;
    flex-shrink: 0;
    object-fit: contain; /* Maintain aspect ratio */
  }

  /* Custom horizontal scrollbar for images */
  #imagediv::-webkit-scrollbar {
    height: 6px;
    width: auto;
  }

  #imagediv::-webkit-scrollbar-track {
    background: white;
  }

  #imagediv::-webkit-scrollbar-thumb {
    background: black;
    min-width: 20px;
    background-clip: content-box;
  }

  #imagediv::-webkit-scrollbar-thumb:hover {
    background: yellow;
  }

  #descriptiondiv.align-top {
    justify-content: flex-start;
  }

  #descp {
    font-size: 9pt;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 85%;
    box-sizing: border-box;
  }

  /* Product cards for mobile */
  #imagediv .product-card {
    min-width: 150px;
    max-width: 150px;
    margin-right: 7px;
    margin-bottom: 0;
    height: auto; /* Let cards size naturally */
  }

  .modal-tap-left,
  .modal-tap-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50vw;
    z-index: 1002; /* Higher than arrows */
    cursor: url('CURSORTCPYELLO.png'), auto;
    display: none; /* Hidden by default, shown when modal is open */
  }

  .modal-tap-left {
    left: 0;
  }

  .modal-tap-right {
    right: 0;
  }

  /* Hide the small arrow buttons on mobile since we have full-screen taps */
  .custom-arrow {
    display: none !important;
  }

  /* Optional: Add subtle visual indicators */
  .modal-tap-left::after,
  .modal-tap-right::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
  }

  .modal-tap-left::after {
    left: 20px;
   
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: center;
  }

  .modal-tap-right::after {
    right: 20px;
    
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: center;
  }

  /* Show indicators on tap/touch */
  .modal-tap-left:active::after,
  .modal-tap-right:active::after {
    opacity: 1;
  }

  /* Mobile close button - make it more visible and accessible */
  .close {
    visibility: hidden !important; /* Override the hidden visibility */
    position: fixed; /* Changed to fixed for better positioning */
    font-size: 30px; /* Slightly smaller for better fit */
    cursor: url('CURSORTCPYELLO.png'), auto;
    z-index: 1003; /* Higher than tap zones */
  opacity: 0;
mix-blend-mode: color-dodge;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  /* Fix backdrop blur for mobile - use fallback for unsupported devices */
  .modal {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); /* Safari support */
  }

  /* For devices that don't support backdrop-filter, use darker background */
  @supports not (backdrop-filter: blur(5px)) {
    .modal {
      background: blur(5px);
    }
  }

  /* Cart drawer adjustments */
  #cartDrawer {
    width: 280px;
    padding: 15px;
  }

  /* Typography wrapper adjustments */
  #typediv-wrapper {
    gap: 10px;
  }

  /* Reduce body padding */
  body, html {
    padding-left: 10px;
    font-size: 9pt;
    /* ADDED: Ensure body takes full height */
    min-height: calc(100vh + 100px);
       height: auto; /* Remove fixed height constraints */  
    overflow-x: hidden; /* Prevent horizontal scroll */
    overflow-y: auto; 
  }
}

/* Very small mobile devices - UPDATED for flexible heights */
@media screen and (max-width: 480px) {
  #maindiv {
    min-height: 100vh; /* Ensure full height */
  }

  body, html {
    padding-left: 5px;
    font-size: 8pt;
    height: 100%;
    min-height: 100vh;
  }

  #topnav {
    padding: 5px;
  }
  #maindiv {
    padding-bottom: 120px;
    min-height: calc(100vh + 120px);
  }

  #imagediv {
    margin-bottom: 200px; /* Even more space for very small screens */
    padding-bottom: 50px;
  }

  #colldiv, #typediv, #photodiv {
    padding: 3px;
    gap: 2px;
    min-width: 0;
  }

  #colldiv p, #typediv p, #photodiv p {
    font-size: 8pt;
    line-height: 1.0;
  }

  /* UPDATED: Flexible heights for small screens */
  #imagediv {
    padding: 10px;
    min-height: 25vh;
    max-height: 55vh;
    /* flex: 2 remains from main mobile query */
  }

  #imagediv img {
    min-height: 150px; /* Smaller minimum for small screens */
    max-height: calc(55vh - 40px);
    margin-right: 6px; /* Reduced gap as requested */
  }

  #imagediv .product-card {
    margin-right: 6px;
  }


  #descriptiondiv {
    width: 92vw;
    min-height: 10vh; /* Smaller minimum */
    max-height: 40vh; /* Smaller maximum */
    padding: 15px;
    /* flex: 1 remains from main mobile query */
  }

  #descp {
    font-size: 8pt;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
  }

  #logo {
    width: 60px;
  }

  #logo:hover {
    width: 40px;
  }
}
/* Hide new mobile logo row by default */
#mobilelogo {
  display: none;
}

/* Mobile layout: show mobile logo row, center the logo */
@media screen and (max-width: 768px) {
  #mobilelogo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    width: 100%;
  }

  #logodiv-mobile {
    text-align: center;
  }

  #logo-mobile {
    width: 50px;
    transition: width 0.3s ease;
    cursor: url('CURSORTCPB.png'), auto;
  }


  
  #logo-mobile:hover {
    width: 35px;
    cursor: url('CURSORTCPYELLO.png'), auto;
  }

  /* Hide original #logodiv only on mobile if not centered */
  #topnav #logodiv:not(.centered) {
    display: none;
  }
}


