/* 
  Sixth Sense Fashion House
  CSC 106 – Web Development
  Core styling and layout
*/


/* google fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500&display=swap');

/* Core design system */
:root {
  --white: #ffffff;
  --bone: #f5f2ed;
  --burgundy: #4a0e0e;
  --text-dark: #1a1a1a;

  --serif: "Playfair Display", serif;
  --sans: "Inter", sans-serif;

  --content-width: 1200px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Global Base */
body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--text-dark);
  line-height: 1.8;
}

main {
  max-width: var(--content-width);
  margin: auto;
}

/* Typograpphy */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
}

p, a, button, input, textarea {
  font-family: var(--sans);
  letter-spacing: 0.3px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: var(--white);
  border-bottom: 1px solid #e5e5e5;
}

.nav-left {
  display: flex;
  gap: 25px;
  justify-self: start;
}

.nav-left a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.nav-left a:hover {
  color: var(--burgundy);
}

/* Header (Transparent) */
.header--transparent {
  width: 100%;
  background: transparent;
  border-bottom: none;
}

.header--transparent a,
.header--transparent .logo {
  color: #ffffff;
}

/* Hero section */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       
  object-position: center; 
  transition: transform 0.45s ease;
}

.hero:hover img {
  transform: scale(1.03);
}

.hero-overlay {
  position: relative;
  z-index: 2;
  height: 100%;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  color: white;
  background: rgba(0, 0, 0, 0.45);
  padding: 40px;
}

/* ANNOUNCEMENT BAR */
.announcement {
  background: var(--burgundy);
  color: var(--white);
  text-align: center;
  padding: 8px 0;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Buttons */
.btn-primary {
  padding: 14px 36px;
  border: 1px solid #ffffff;
  color: #ffffff;
  text-decoration: none;
}

.btn-primary:hover {
  background: #ffffff;
  color: var(--burgundy);
}

/* Sections */
section {
  padding: 90px 40px;
}

/* Product grid */
.product-grid .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* .product img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
} */

.product-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f2ed;
  overflow: hidden;
  
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
  /* display: block; */
}

.product:hover .product-image img {
  transform: scale(1.04);
}

.price {
  display: inline-block;
  align-self: center;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--text-dark);
  border: 1px solid #ddd4c8;
  background: #fbfaf8;
  border-radius: 999px;
  text-align: center;
}

.add-to-cart-btn {
  width: auto;
  align-self: center;
  padding: 10px 18px;
  background: var(--burgundy);
  color: var(--white);
  border: 1px solid var(--burgundy);
  font-size: 0.82rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.add-to-cart-btn:hover {
  background: transparent;
  color: var(--burgundy);
}

.cart-toggle {
  width: auto;
  border: 1px solid #d8d8d8;
  background: #ffffff;
  color: var(--text-dark);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.cart-toggle .cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 7px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  background: var(--burgundy);
  color: var(--white);
}

.nav-right {
  display: flex;
  justify-content: flex-end;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 40;
}

.cart-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-tray {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(380px, 92vw);
  background: #ffffff;
  border-left: 1px solid #e9e9e9;
  padding: 24px;
  transform: translateX(105%);
  transition: transform 0.28s ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-tray.open {
  transform: translateX(0);
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-head h3 {
  font-size: 1.25rem;
}

.cart-close {
  width: auto;
  padding: 6px 10px;
  border: 1px solid #ccc;
  background: #fff;
  color: var(--text-dark);
  border-radius: 6px;
  cursor: pointer;
}

.cart-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.cart-item {
  border: 1px solid #ece7df;
  background: #fcfbf9;
  padding: 10px 12px;
  border-radius: 10px;
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.cart-item-price {
  font-size: 0.84rem;
  color: #4a4a4a;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.cart-qty {
  font-size: 0.78rem;
  color: #575757;
}

.cart-remove {
  width: auto;
  background: transparent;
  border: 1px solid #d4d4d4;
  color: #333;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
}

.cart-foot {
  margin-top: auto;
  border-top: 1px solid #ececec;
  padding-top: 14px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 12px;
}

.cart-checkout {
  width: 100%;
  border-radius: 999px;
}

.cart-empty {
  font-size: 0.88rem;
  color: #5d5d5d;
  border: 1px dashed #d9d9d9;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.cart-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: var(--burgundy);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  letter-spacing: 0.2px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.cart-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 50px;
  margin-top: 60px;
}

.section-subtitle {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 40px;
  margin-top: -40px;
}

.member-card {
  text-align: center;
  cursor: pointer;
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

.image-wrapper img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
  transition: all 0.4s ease;
}

.member-card:hover .image-wrapper {
  box-shadow: 0 0 40px rgba(74, 14, 14, 0.4),
              0 0 20px rgba(74, 14, 14, 0.3),
              0 0 60px rgba(179, 120, 120, 0.2);
  transform: scale(1.05);
}

.member-card:hover .image-wrapper img {
  filter: brightness(1.1);
}

.member-info h3 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.member-info .title {
  font-size: 0.95rem;
  color: var(--burgundy);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Team grid for home page */
.team-grid-home {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 50px;
  justify-items: center;
  justify-content: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.member-tile {
  text-align: center;
  cursor: pointer;
  width: 100%;
  max-width: 200px;
}

.tile-image {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.tile-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: all 0.4s ease;
}

.member-tile:hover .tile-image {
  box-shadow: 0 0 30px rgba(74, 14, 14, 0.4),
              0 0 15px rgba(74, 14, 14, 0.3),
              0 0 45px rgba(179, 120, 120, 0.2);
  transform: scale(1.05);
}

.member-tile:hover .tile-image img {
  filter: brightness(1.1);
}

.member-tile h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--text-dark);
}

.tile-title {
  font-size: 0.85rem;
  color: var(--burgundy);
  font-weight: 500;
  letter-spacing: 0.4px;
}

/* Centered layout for last row (3 items) */
.team-grid-home > :nth-child(n+5) {
  grid-column: auto;
}

/* Team section link */
.team-link {
  text-align: center;
  margin-top: 50px;
}

.btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--burgundy);
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--burgundy);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-secondary:hover {
  background: transparent;
  color: var(--burgundy);
}

@media (max-width: 1024px) {
  .team-grid-home {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .team-grid-home {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* INNER PAGES */
.inner-page header {
  position: relative;
  background: var(--white);
}

.inner-page main {
  padding: 140px 60px 120px;
}

.page-title {
  font-family: var(--serif);
  font-size: 2.6rem;
  margin-bottom: 70px;
  text-align: center;
}

.logo {
  font-family: var(--serif);
  font-size: 1.6rem;
  justify-self: center;
}

/* Forms */
form {
  max-width: 500px;
  margin: auto;
}

input, textarea {
  width: 100%;
  padding: 12px 0;
  margin-bottom: 25px;
  border: none;
  border-bottom: 1px solid #ccc;
  background: transparent;
}

button {
  width: 100%;
  padding: 14px;
  background: var(--burgundy);
  color: var(--white);
  border: none;
  cursor: pointer;
}

/* Footer */
footer {
  background: var(--bone);
  text-align: center;
  padding: 40px;
  font-size: 0.8rem;
}

footer a {
  margin: 0 15px;
  text-decoration: none;
  color: var(--text-dark);
}

/* Home header(THIS WAS VISIBILTY FIX) */
.header--transparent .nav-left a,
.header--transparent .logo {
  color: #0f0f0f;
  opacity: 1;
}

.header--transparent .nav-left a:hover {
  color: #080808;
  opacity: 0.8;
}

/* SECONDARY BUTTON (LIGHT BG) */
.btn-secondary {
  padding: 14px 36px;
  border: 1px solid var(--burgundy);
  color: var(--burgundy);
  text-decoration: none;
  letter-spacing: 1px;
  font-size: 0.8rem;
}

.btn-secondary:hover {
  background-color: var(--burgundy);
  color: var(--white);
}
/* EVENTS SECTION */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}

.event-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.event-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
}

.event-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #777;
}
