:root {
  --primary: #fff;
  --secondary: #000;
}

body {
  font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  background: var(--primary);
}

.dark-theme {
  --primary: #1b1a1a;
  --secondary: #fff;
}

/* Navigation and general responsive styles */
.center { 
  text-align: center; 
  padding: 2%; 
  margin: 5px auto;
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

.center a {
  display: inline-block;
  margin: 0 5px;
  padding: 5px;
}

/* Mobile responsive navigation */
@media (max-width: 768px) {
  .center {
    padding: 1.5%;
    margin: 4px auto;
    font-size: 14px;
  }
  
  .center a {
    margin: 0 3px;
    padding: 4px;
  }
}

@media (max-width: 480px) {
  .center {
    padding: 1%;
    margin: 3px auto;
    font-size: 12px;
    white-space: normal;
    line-height: 1.6;
  }
  
  .center a {
    margin: 2px;
    padding: 3px;
  }
}

/* UPDATED HEADER ICONS STYLES */
.DN {
  position: absolute; 
  top: 15px; 
  right: 40px; /* Reduced from 130px to make room for both icons */
  display: flex; 
  align-items: center;
  gap: 20px; /* Space between the two icons */
  margin: 0;
  padding: 10px; /* Reduced padding to prevent overlap */
  z-index: 100;
}

#day-N-night { 
  width: 40px; 
  height: 40px;
  cursor: pointer; 
  border-radius: 100%; 
  padding: 4px;
  transition: transform 0.3s ease;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9); /* Increased opacity */
  border: 1px solid rgba(255, 255, 255, 0.2);
  /* Removed blur effect */
}

#day-N-night:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1); /* Solid white on hover */
}

.checkout-icon {
  position: relative; /* Changed from absolute to work within flex container */
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.2s ease;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9); /* Increased opacity */
  border: 1px solid rgba(255, 255, 255, 0.2);
  /* Removed blur effect */
}

.checkout-icon:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 1); /* Solid white on hover */
}

.checkout-icon svg {
  display: block;
  width: 28px;
  height: 28px;
}

/* Mobile responsive adjustments for header icons */
@media (max-width: 768px) {
  .DN {
    top: 12px;
    right: 30px;
    gap: 15px;
    padding: 8px;
  }
  
  #day-N-night {
    width: 35px;
    height: 35px;
    padding: 3px;
  }
  
  .checkout-icon {
    padding: 6px;
  }
  
  .checkout-icon svg {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 480px) {
  .DN {
    top: 10px;
    right: 20px;
    gap: 12px;
    padding: 6px;
  }
  
  #day-N-night {
    width: 32px;
    height: 32px;
    padding: 2px;
  }
  
  .checkout-icon {
    padding: 5px;
  }
  
  .checkout-icon svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 320px) {
  .DN {
    right: 15px;
    gap: 10px;
    padding: 5px;
  }
  
  #day-N-night {
    width: 28px;
    height: 28px;
  }
  
  .checkout-icon svg {
    width: 22px;
    height: 22px;
  }
}

/* Add logo container for better positioning control */
.logo-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 15px auto 10px auto;
}

/* Ensure both icons align with logo */
#logo1, #logo2 {
  height: 80px; 
  max-width: 90%;
  width: auto;
  display: block; 
  padding: 0;
  object-fit: contain;
  position: relative;
  z-index: 99;
}
#logo2 { display: none; }

/* Mobile responsive logo styles */
@media (max-width: 768px) {
  .logo-container {
    justify-content: flex-start; /* Move logo to left on mobile */
    padding-left: 20px;
    margin: 10px auto 8px auto;
  }
  
  #logo1, #logo2 {
    height: 60px;
    max-width: 85%;
    margin: 0; /* Remove auto margin for left alignment */
  }
}

@media (max-width: 480px) {
  .logo-container {
    padding-left: 15px;
    margin: 8px auto 6px auto;
  }
  
  #logo1, #logo2 {
    height: 50px;
    max-width: 80%;
  }
  
  /* FIX FOR MOBILE: Prevent icons from overlapping logo */
  .DN {
    top: 5px;
    right: 10px;
    gap: 10px;
    padding: 4px;
  }
  
  #day-N-night {
    width: 30px;
    height: 30px;
  }
  
  .checkout-icon {
    padding: 4px;
  }
  
  .checkout-icon svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 320px) {
  .logo-container {
    padding-left: 10px;
    margin: 6px auto 4px auto;
  }
  
  #logo1, #logo2 {
    height: 45px;
    max-width: 75%;
  }
  
  .DN {
    right: 8px;
    gap: 8px;
    padding: 3px;
  }
  
  #day-N-night {
    width: 26px;
    height: 26px;
  }
  
  .checkout-icon svg {
    width: 20px;
    height: 20px;
  }
}

a {
  transition: .3s; text-decoration: none;
  color: var(--secondary); margin-left: 10px;
}
a:hover { color: #616161; }

/* Responsive heading styles */
.heading {
  font-weight: 800; 
  font-size: 50px;
  color: var(--secondary); 
  text-transform: uppercase;
  margin-top: 0; 
  padding: 0;
  text-align: center;
}

header { 
  color: var(--secondary); 
  text-align: center; 
  padding: 15px 10px;
}

header p {
  margin: 10px auto;
  padding: 0 15px;
  max-width: 90%;
}

/* Mobile responsive header styles */
@media (max-width: 768px) {
  .heading {
    font-size: 36px;
    margin-top: 5px;
    line-height: 1.2;
  }
  
  header {
    padding: 12px 8px;
  }
  
  header p {
    font-size: 16px;
    margin: 8px auto;
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .heading {
    font-size: 28px;
    margin-top: 3px;
    line-height: 1.1;
    padding: 0 10px;
  }
  
  header {
    padding: 10px 5px;
  }
  
  header p {
    font-size: 14px;
    margin: 6px auto;
    padding: 0 8px;
    line-height: 1.4;
  }
}

@media (max-width: 320px) {
  .heading {
    font-size: 24px;
    padding: 0 8px;
  }
  
  header p {
    font-size: 13px;
  }
}

.container {
  width: 100%; 
  max-width: 1200px;
  margin: auto;
  display: flex; 
  flex-wrap: wrap; 
  justify-content: space-around;
  padding: 0 15px;
  box-sizing: border-box;
}

.product {
  background: #fff; 
  border: 1.5px solid var(--secondary);
  border-radius: 10px; 
  width: 100%;
  max-width: 350px;
  padding: 20px;
  text-align: center; 
  margin: 15px auto;
  box-shadow: 8px 6px 2px rgba(113,113,113,0.1);
  transition: 0.7s;
  box-sizing: border-box;
}

/* Mobile responsive styles for container and products */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
    justify-content: center;
  }
  
  .product {
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 8px;
  }
  
  .product {
    width: 100%;
    max-width: 100%;
    margin: 8px 0;
    padding: 12px;
    border-radius: 8px;
  }
}

/* Enhanced product image responsive styles */
.product img {
  max-width: 100%; 
  width: 100%;
  height: auto;
  min-height: 200px;
  max-height: 250px;
  object-fit: cover;
  padding-bottom: 8px;
  border-radius: 10px; 
  transition: 0.7s;
}

.product img:hover {
  transform: scale(1.05); 
  cursor: none; 
  border-radius: 15px;
}

.product:hover { 
  border-radius: 15px; 
}

/* Mobile responsive product image styles */
@media (max-width: 768px) {
  .product img {
    min-height: 180px;
    max-height: 220px;
    padding-bottom: 6px;
    border-radius: 8px;
  }
  
  .product img:hover {
    transform: scale(1.03);
    border-radius: 12px;
  }
  
  .product:hover {
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .product img {
    min-height: 160px;
    max-height: 200px;
    padding-bottom: 4px;
    border-radius: 6px;
  }
  
  .product img:hover {
    transform: scale(1.02);
    border-radius: 10px;
  }
  
  .product:hover {
    border-radius: 10px;
  }
}

/* Updated button styles for single button layout - Mobile Responsive */
button {
  padding: 12px 20px; 
  width: 100%;
  max-width: 100%;
  background: #fff; 
  color: #010101;
  border: none; 
  border-radius: 10px; 
  cursor: pointer;
  transition: 0.6s 0.2s; 
  outline: 1px solid #003097;
  margin: 8px 0;
  box-sizing: border-box;
  font-size: 14px;
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

button:hover {
  background: #2e2e2e; 
  color: #fff; 
  transform: scale(1.02);
}

/* Mobile responsive button styles */
@media (max-width: 768px) {
  button {
    padding: 14px 16px;
    font-size: 16px;
    margin: 10px 0;
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
    text-overflow: clip;
    height: auto;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  button:hover {
    transform: scale(1.01);
  }
}

@media (max-width: 480px) {
  button {
    padding: 16px 12px;
    font-size: 15px;
    margin: 8px 0;
    min-height: 50px;
    border-radius: 6px;
  }
}

/* Ensure buttons never overflow on very small screens */
@media (max-width: 320px) {
  button {
    padding: 14px 8px;
    font-size: 14px;
    min-height: 46px;
  }
}

/* Enhanced responsive product text styles */
.product h2 { 
  transition: 0.4s;
  font-size: 22px;
  margin: 12px 0 8px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.product h2:hover { 
  color: #303030; 
  cursor: default; 
}

.product p {
  font-size: 16px;
  margin: 8px 0 12px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Mobile responsive product text styles */
@media (max-width: 768px) {
  .product h2 {
    font-size: 20px;
    margin: 10px 0 6px 0;
  }
  
  .product p {
    font-size: 15px;
    margin: 6px 0 10px 0;
  }
}

@media (max-width: 480px) {
  .product h2 {
    font-size: 18px;
    margin: 8px 0 4px 0;
  }
  
  .product p {
    font-size: 14px;
    margin: 4px 0 8px 0;
  }
}

@media (max-width: 320px) {
  .product h2 {
    font-size: 16px;
  }
  
  .product p {
    font-size: 13px;
  }
}

footer { background: #000; color: whitesmoke; padding: 10px; }
.cp { padding-bottom: 0; text-align: center; }
.play { margin-top: 10px; border-radius: 5px; }

#progress {
  width: 100%; height: 1%; cursor: pointer;
  background: gray; border-radius: 4px;
}

/* ===== ENHANCED SIDEBAR STYLES WITH EXIT ANIMATION ===== */

/* Add overlay for sidebar background dimming */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar base styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 20px 15px;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0.2, 0.2, 1);
    box-sizing: border-box;
    /* Force all text in sidebar to be dark for visibility */
    color: #333 !important;
}

.cart-sidebar * {
    /* Ensure all child elements have dark text */
    color: #333 !important;
}

.cart-sidebar.active {
    right: 0;
}

.cart-sidebar.closing {
    right: -100%;
    transition: right 0.3s cubic-bezier(0.4, 0.2, 0.2, 1);
}

/* Hide cart icon when sidebar is active */
.cart-icon-hidden {
    display: none !important;
}

/* Cart sidebar content styles */
.cart-sidebar .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #070707 !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 1001;
}

.cart-sidebar .close-btn:hover {
    background-color: #f0f0f0;
}

/* Sidebar-specific button styling to override main page button styles */
.cart-sidebar button {
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 5px;
    width: auto;
    background: #ffffff;
    color: #000000 !important;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, transform 0.2s;
    outline: none;
    margin-left: 10px;
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
    text-overflow: clip;
    height: auto;
}

.cart-sidebar button:hover {
    background: #ff7373;
    color: #fff !important;
    transform: scale(1.05);
}

.cart-sidebar h2 {
    margin-top: 40px;
    font-size: 22px;
    margin-bottom: 15px;
    text-align: left;
    padding: 0 10px;
    color: #333 !important;
}

.cart-sidebar p {
    font-size: 16px;
    color: #555 !important;
    padding: 0 10px;
}

/* Enhanced cart icon badge styling with better positioning */
.cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: #fff !important;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    border: 2px solid #fff;
    line-height: 1;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

.checkout-icon:hover .cart-count-badge {
    background: #c0392b;
    transform: scale(1.1);
}

/* Mobile responsive badge */
@media (max-width: 480px) {
    .cart-count-badge {
        font-size: 10px;
        padding: 1px 4px;
        min-width: 14px;
        height: 14px;
        top: -3px;
        right: -3px;
    }
}

/* Checkout button styling */
#checkout-btn {
    padding: 15px 20px;
    font-size: 16px;
    border-radius: 8px;
    width: 100%;
    margin: 20px auto 0;
    display: block;
    background: #717171;
    color: #fff !important;
    border: none;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, transform 0.2s;
}

#checkout-btn:hover {
    background: #949494;
    color: #fff !important;
    transform: scale(1.02);
}

/* Cart total styling */
#cart-total {
    font-weight: bold;
    margin: 15px 0 0 0;
    padding: 0 10px;
    font-size: 18px;
    color: #333 !important;
}

/* Cart items styling */
#cart-items {
    padding: 10px;
}

#cart-items > div {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    background: #f9f9f9;
}

#cart-items img {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    margin-right: 10px;
    object-fit: cover;
}

#cart-items span, #cart-items strong {
    color: #333 !important;
}

#empty-cart-msg {
    text-align: center;
    padding: 20px;
    color: #777 !important;
}

/* Mobile responsive styles for sidebar */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        max-width: 100%;
        padding: 70px 15px 30px;
        right: -100%;
    }
    
    .cart-sidebar.active {
        right: 0;
    }
    
    .cart-sidebar.closing {
        right: -100%;
    }
    
    .cart-sidebar .close-btn {
        top: 20px;
        right: 20px;
        font-size: 28px;
        width: 44px;
        height: 44px;
    }
    
    .cart-sidebar h2 {
        font-size: 24px;
        text-align: center;
        margin-top: 20px;
    }
    
    #cart-items > div {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    #cart-items img {
        margin-bottom: 10px;
    }
    
    #cart-total {
        font-size: 20px;
        text-align: center;
        margin: 20px 0;
    }
    
    #checkout-btn {
        font-size: 18px;
        padding: 16px;
        margin: 10px auto;
        max-width: 90%;
    }
    
    .cart-sidebar button {
        width: 100%;
        margin: 10px 0;
        padding: 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .cart-sidebar {
        padding: 60px 12px 25px;
    }
    
    .cart-sidebar .close-btn {
        top: 15px;
        right: 15px;
        font-size: 24px;
        width: 40px;
        height: 40px;
    }
    
    .cart-sidebar h2 {
        font-size: 22px;
    }
    
    #cart-items > div {
        padding: 12px;
    }
    
    #cart-total {
        font-size: 18px;
    }
    
    #checkout-btn {
        font-size: 16px;
        padding: 14px;
    }
}

@media (max-width: 320px) {
    .cart-sidebar {
        padding: 50px 10px 20px;
    }
    
    .cart-sidebar .close-btn {
        top: 12px;
        right: 12px;
        font-size: 20px;
        width: 36px;
        height: 36px;
    }
    
    .cart-sidebar h2 {
        font-size: 20px;
    }
    
    #cart-items img {
        width: 45px;
        height: 45px;
    }
}