/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    padding-top: 70px; 
    padding-bottom: 70px;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header styling */
.main-header {
    background-color: #2c3e50;
    padding: 20px 0;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-button {
    font-size: 24px;
    cursor: pointer;
    color: #ecf0f1;
    transition: color 0.3s;
    padding-left: 10px;
}

.back-button:hover {
    color: #e74c3c;
}

.page-title {
    font-size: 20px;
    font-weight: 500;
    color: #ecf0f1;
    text-align: center;
    flex-grow: 1;
}

.cart-button {
    font-size: 28px;
    cursor: pointer;
    color: #ecf0f1;
    transition: color 0.3s;
    padding-right: 25px;
}

.cart-button:hover {
    color: #e74c3c;
}

/* Product details page specific styling */
.product-detail-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 10px; /* Reduced from 30px to 10px */
}

.product-detail-image {
    text-align: center;
    margin-bottom: 20px;
}

.product-detail-image img {
    width: 300px; /* Fixed width */
    height: 300px; /* Fixed height */
    object-fit: cover; /* Ensures image covers the defined area */
    border-radius: 10px;
}

.product-detail-info {
    text-align: left;
}

.product-detail-info h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.product-price {
    font-size: 18px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.product-description {
    font-size: 16px;
    color: #777;
    margin-bottom: 20px;
}

/* Add to Cart Button */
.add-to-cart-button {
    background-color: #e74c3c;
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart-button:hover {
    background-color: #c0392b;
}

/* Bottom buttons styling */
.bottom-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #f0f0f0; /* Light grey to differentiate from the normal white background */
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 10%;
}

.bottom-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333;
    font-size: 14px;
    transition: color 0.3s;
}

.bottom-button i {
    font-size: 24px;
    padding-top: 40%;
}

.bottom-button span {
    margin-top: 5px;
}

.bottom-button:hover {
    color: #e74c3c;
}

/* Order information section styling */
.order-info {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(54, 48, 48, 0.1);
    padding: 20px;
    margin-top: 20px; 
    text-align: center; 
}

.order-call-text {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 10px; /
}

.shipping-info {
    font-size: 16px;
    color: #777;
}
/* Loading styles */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8); /* semi-transparent white overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* high z-index so it appears on top */
  }
  
  /* Spinner Container */
  .spinner {
    --uib-size: 40px;
    --uib-color: #e74c3c; /* Spinner dot color */
    --uib-speed: 1.3s;
    --uib-dot-size: 25%;
    position: relative;
    display: inline-block;
    height: var(--uib-size);
    width: var(--uib-size);
    animation: spin var(--uib-speed) infinite linear;
  }
  
  /* Dot styles */
  .spinner .dot {
    position: absolute;
    left: calc(50% - var(--uib-dot-size) / 2);
    width: var(--uib-dot-size);
    height: 100%;
  }
  
  .spinner .dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding-bottom: 100%;
    background-color: var(--uib-color);
    border-radius: 50%;
    transition: background-color 0.3s ease;
  }
  
  /* Staggered animations for the dots */
  .spinner .dot:nth-child(1) {
    transform: rotate(120deg);
  }
  .spinner .dot:nth-child(1)::after {
    animation: wobble var(--uib-speed) infinite ease-in-out;
  }
  
  .spinner .dot:nth-child(2) {
    transform: rotate(-120deg);
  }
  .spinner .dot:nth-child(2)::after {
    animation: wobble var(--uib-speed) infinite ease-in-out;
  }
  
  .spinner .dot:nth-child(3)::after {
    animation: wobble var(--uib-speed) infinite ease-in-out;
  }
  
  /* Keyframes for spinner and wobble */
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  @keyframes wobble {
    0%, 100% { transform: translateY(0%); }
    50% { transform: translateY(65%); }
  }
  

:root {
  /* Dark/Muted Palette */
  --backdrop-color: rgba(0, 0, 0, 0.6);
  --modal-bg: #2b2b2b;           /* Deep charcoal */
  --header-bg: #b73127;          /* Muted red accent */
  --button-primary: #b73127;     /* Same red for buttons */
  --button-primary-hover: #99261f;/* Darker on hover */
  --button-secondary: transparent;
  --text-primary: #ffffff;       /* White text */
  --footer-bg: #262626;          /* Slightly darker than modal-bg */
  --border-radius: 8px;
  --shadow-modal: 0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-button: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Backdrop fade-in */
@keyframes fadeInBg {
  from { backdrop-filter: blur(0); opacity: 0; }
  to   { backdrop-filter: blur(5px); opacity: 1; }
}

/* Modal scale-in */
@keyframes scaleIn {
  0%   { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--backdrop-color);
  animation: fadeInBg 0.25s ease forwards;
}
.modal.show {
  display: flex;
}

.modal-content {
  position: relative;            /* for absolute close button */
  background-color: var(--modal-bg);
  border-radius: var(--border-radius);
  width: 100%;                   /* fill parent/container */
  /* no max-width so it can occupy its wrapper’s width */
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  transform-origin: center center;
  animation: scaleIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Header */
.modal-header {
  background-color: var(--header-bg);
  padding: 1rem 1.5rem;
  color: var(--text-primary);
}
.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Close button */
.close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.4rem;
  color: var(--text-primary);
  background: rgba(255,255,255,0.1);
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}
.close:hover {
  background: rgba(255,255,255,0.2);
}

/* Body */
.modal-body {
  padding: 1.5rem;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
  background-color: var(--modal-bg);
}

/* Footer + buttons */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background-color: var(--footer-bg);
  border-top: 1px solid #444;
}

.modal-button {
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--button-primary);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

/* Primary (filled) */
.login-button {
  background-color: var(--button-primary);
  color: var(--text-primary);
}
.login-button:hover {
  transform: translateY(-2px);
  background-color: var(--button-primary-hover);
}

/* Secondary (outline) */
.signup-button {
  background-color: var(--button-secondary);
  color: var(--button-primary);
}
.signup-button:hover {
  transform: translateY(-2px);
  background-color: var(--button-primary);
  color: var(--text-primary);
}
/* Prevent body from scrolling when this class is present */
.lock-scroll {
  overflow: hidden !important;
  height: 100%;
}

.cart-button {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: 17px;
  background: #e60023;
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 50%;
  display: none; /* hide when zero */
}
