
/* ==========================================
   DAG MANAGEMENT STORE
   ========================================== */


/* ==========================================
   CLIENT FEATURED ITEMS HEADER
   ========================================== */

.store-header {
  width: min(1050px, 92%);
  margin: 35px auto;
  padding: 25px 30px;

  background: rgba(77, 77, 77, 0.94);
  border: 7px solid hsl(224, 100%, 18%);
  border-radius: 18px;

  box-sizing: border-box;
  text-align: center;
}

/* Heading with white outline */

.store-header h1,
.store-header h2 {
  color: #002142;
  font-weight: 800;
  margin-bottom: 10px;
  font: #ffffff;

  -webkit-text-stroke: 1.5px #ffffff;
  paint-order: stroke fill;

  text-shadow:
    1px 1px 2px rgba(0, 0, 0, 0.20);
}

/* Tagline beneath heading */

.store-header p {
  color: #fafafa;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 0;
}


/* ==========================================
   STORE AND ADMIN CONTAINERS
   ========================================== */

.admin-container {
  width: min(1100px, 92%);
  margin: 35px auto;
  background: rgba(24, 0, 90, 0.94);
}

.store-container {
  width: min(1100px, 92%);
  margin: auto;
}


/* ==========================================
   PRODUCT GRID
   ========================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}


/* ==========================================
   PRODUCT CARDS AND ADMIN ITEMS
   ========================================== */

.product-card,
.admin-item {
  padding: 18px;
  border: 7px solid hsl(224, 100%, 18%);
  border-radius: 18px;
  background: #ffffff;
  color: #ffffff;
}

/* Product cards over the background video */

.video-store .product-card {
  background: rgba(80, 80, 80, 0.94);
  border-radius: 18px;
  padding: 16px;
  color: #ffffff;
}

/* Center product information */

.product-card {
  text-align: center;
}

.product-card h3,
.product-card p {
  text-align: center;
}

/* Product photographs */

.product-card img {
  display: block;
  width: 100%;
  height: 220px;

  object-fit: cover;
  border-radius: 5px;

  margin-left: auto;
  margin-right: auto;
}


/* ==========================================
   PRODUCT BUTTONS
   REQUEST TO BUY AND FACEBOOK SHARE
   ========================================== */

.product-card button,
.product-card .facebook-share-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 60px;
  padding: 15px 20px;
  margin: 10px 0;

  background: #0080ff !important;
  color: #ffffff !important;

  border: 2px solid #002244 !important;
  border-radius: 8px;

  font-family: "Lato", Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;

  text-align: center;
  text-transform: none;
  letter-spacing: normal;

  cursor: pointer;
  box-sizing: border-box;
}

/* Button hover */

.product-card button:hover,
.product-card .facebook-share-button:hover {
  background: #00509e !important;
  color: #ffffff !important;
}

/* Keyboard accessibility */

.product-card button:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
}


/* ==========================================
   ADMIN BUTTONS AND FORMS
   ========================================== */

.admin-container button {
  padding: 12px 18px;
  min-height: 48px;
  margin-top: 10px;
  cursor: pointer;
}

.admin-container form {
  display: grid;
  gap: 10px;
  max-width: 550px;
}

.admin-container input,
.admin-container textarea,
.admin-container select {
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  margin-bottom: 10px;
  color: #000000;
}

.admin-item {
  margin: 12px 0;
  display: grid;
  gap: 8px;
}


/* ==========================================
   PURCHASE DIALOG
   ========================================== */

dialog {
  width: min(420px, 90%);
  border: 1px solid #aaa;
  border-radius: 10px;
  padding: 24px;
}

dialog::backdrop {
  background: rgba(29, 29, 29, 0.65);
}

dialog form {
  display: grid;
  gap: 12px;
}

dialog input {
  padding: 12px;
}


/* ==========================================
   FIXED VIDEO BACKGROUND
   ========================================== */

/*
   Video stays stationary while the
   website content scrolls over it.

   The video element should be placed
   directly inside <body>, outside
   the .video-store container.
*/

.store-background-video {
  position: fixed;
  inset: 0;

  width: 100%;
  height: 100vh;

  object-fit: cover;
  object-position: center center;

  z-index: -2;
  pointer-events: none;
}


/* ==========================================
   DARK VIDEO OVERLAY
   ========================================== */

/*
   A 40% black overlay gradually fades
   over the background video.
*/

.store-video-overlay {
  position: fixed;
  inset: 0;

  width: 100%;
  height: 100vh;

  background: rgba(0, 0, 0, 0.40);

  z-index: -1;
  pointer-events: none;

  opacity: 0;
  animation: overlayFadeIn 1.5s ease-out 0.5s forwards;
}

/* Dark overlay fade-in */

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


/* ==========================================
   STORE VIDEO SECTION
   ========================================== */

.video-store {
  position: relative;
  min-height: 100vh;
  padding: 40px 20px;

  overflow: visible;
  isolation: auto;
}

/* Keep product content above video */

.store-content {
  position: relative;
  z-index: 1;
}


/* ==========================================
   SHARED ITEM HIGHLIGHT
   ========================================== */

.shared-item-highlight {
  outline: 3px solid #1877f2;
  outline-offset: 3px;
}


/* ==========================================
   PRODUCT CARD FADE-IN ANIMATION
   ========================================== */

@keyframes productFadeIn {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-store .product-card {
  animation: productFadeIn 1.5s ease-out both;
  animation-delay: 0.5s;
}


/* ==========================================
   HIDDEN ELEMENTS
   ========================================== */

[hidden] {
  display: none !important;
}


/* ==========================================
   TABLET RESPONSIVE LAYOUT
   ========================================== */

@media (max-width: 768px) {

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card img {
    height: 170px;
  }

  .admin-container {
    width: 94%;
  }

  .admin-container button {
    width: 100%;
    min-height: 44px;
  }

  .video-store {
    padding: 20px 10px;
  }
}


/* ==========================================
   MOBILE RESPONSIVE LAYOUT
   ========================================== */

@media (max-width: 480px) {

  /* Client Featured Items header */

  .store-header {
    width: 94%;
    padding: 20px 15px;
  }

  .store-header p {
    font-size: 16px;
  }

  /* One product per row */

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card img {
    height: 240px;
  }

  /* Purchase dialog */

  dialog {
    max-width: 90%;
  }
}


/* ==========================================
   ACCESSIBILITY: REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {

  /* Hide moving video */

  .store-background-video {
    display: none;
  }

  /* Provide a solid background */

  .video-store {
    background: #253039;
  }

  /* Disable overlay animation */

  .store-video-overlay {
    animation: none;
    opacity: 1;
  }

  /* Disable product card animation */

  .video-store .product-card {
    animation: none;
  }
}


/* =========================================
   DAG Management — Admin Text Visibility
   ========================================= */

/* Administrator text */
.admin-container {
  color: #000000;
}

/* Login, upload, and edit form fields */
.admin-container input,
.admin-container textarea,
.admin-container select {
  background-color: #ffffff !important;
  color: #333333 !important;
  -webkit-text-fill-color: #000000;
  font-size: 38px;
}

/* Field placeholders */
.admin-container input::placeholder,
.admin-container textarea::placeholder {
  color: #868686 !important;
  opacity: 1;
}

/* Inventory and incoming offer cards */
.admin-container .admin-item {
  background-color: #8a8a8a;
  color: #313131;
}

/* Text inside offer and inventory cards */
.admin-container .admin-item p,
.admin-container .admin-item strong,
.admin-container .admin-item h3,
.admin-container label {
  color: #ffffff;
  font-size: 36px;
}

/* Preserve readable button labels */
.admin-container button {
  color: #222222;
}



/* ==========================================
   DAG MANAGEMENT ADMIN STYLING
   ========================================== */

/* Main blue admin panel */
.admin-container {
  background: #18005a;
  color: #ffffff;
  padding: 30px;
  border-radius: 14px;
  line-height: 1.5;
}

/* All headings and informational text */
.admin-container h1,
.admin-container h2,
.admin-container h3,
.admin-container p,
.admin-container label,
.admin-container strong,
.admin-container a {
  color: #ffffff;
}

/* White buttons with dark blue lettering */
.admin-container button {
  background: #ffffff !important;
  color: #18005a !important;
  border: 2px solid #ffffff;
  border-radius: 8px;
  padding: 10px 18px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  text-transform: none;
}

/* Button hover */
.admin-container button:hover {
  background: #e6ecff !important;
  color: #18005a !important;
}

/* Form labels */
.admin-container label {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

/* Form inputs */
.admin-container input:not([type="checkbox"]),
.admin-container textarea,
.admin-container select {
  background: #ffffff !important;
  color: #222222 !important;
  -webkit-text-fill-color: #222222;
  font-size: 17px;
  padding: 10px 12px;
  border-radius: 6px;
}

/* Inventory and offer cards */
.admin-container .admin-item {
  background: #414b65;
  color: #ffffff;
  padding: 18px;
  border-radius: 10px;
}

/* Text inside inventory and offer cards */
.admin-container .admin-item h3,
.admin-container .admin-item p,
.admin-container .admin-item strong {
  color: #ffffff;
  font-size: 17px;
}

/* Reduce excessive paragraph spacing */
.admin-container p {
  margin-bottom: 12px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .admin-container {
    padding: 18px;
  }

  .admin-container button {
    width: 100%;
  }
}


/* Inventory status dropdown */
.admin-container select {
  min-height: 48px;
  padding: 8px 12px;
  font-size: 17px;
  line-height: 1.4;
  border-radius: 6px;
}

/* ==========================================
   TEXT SHARE BUTTON
   ========================================== */
.text-share-button {
  background-color: #176b45;
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 6px;
  padding: 12px 18px;
  margin: 8px 5px;
  cursor: pointer;
  font-weight: 600;
}

.text-share-button:hover {
  background-color: #105234;
}

@media (max-width: 600px) {
  .text-share-button {
    width: 100%;
    margin: 8px 0;
  }
}

/* ==========================================
   DAG MANAGEMENT — PRODUCT IMAGE ZOOM
   ========================================== */

/* Clickable product photographs */
.product-card img.zoomable-image {
  cursor: zoom-in;
}

.product-card img.zoomable-image:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 4px;
}

/* Fullscreen image viewer */
.image-zoom-viewer {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.94);
  padding: 20px;
  box-sizing: border-box;

  overflow: hidden;
}

/* Enlarged photograph */
.image-zoom-photo {
  display: block;

  max-width: 95vw;
  max-height: 90vh;

  width: auto;
  height: auto;

  object-fit: contain;

  cursor: zoom-out;
  touch-action: none;
  user-select: none;

  transform-origin: center center;
}

/* Close button */
.image-zoom-close {
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 2;

  width: 48px;
  height: 48px;

  background: #ffffff;
  color: #002244;

  border: none;
  border-radius: 50%;

  font-size: 34px;
  line-height: 1;

  cursor: pointer;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .image-zoom-viewer {
    padding: 10px;
  }

  .image-zoom-photo {
    max-width: 100%;
    max-height: 85vh;
  }

  .image-zoom-close {
    top: 10px;
    right: 10px;
  }
}

/* Smooth image panning */
.image-zoom-photo {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;

  transform-origin: center center;
  cursor: grab;
}

.image-zoom-photo:active {
  cursor: grabbing;
}
