body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  max-width: 980px;
  margin: 40px auto;
  padding: 10px;
  background: #e7ecf5;
}

h1, p {
  text-align: center;
  margin-bottom: 24px;
}

.appLayout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: center;
}

.cartWidget {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.cartToggle {
  border: 2px solid #1a1f2b;
  background: #ffffff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  color: #131824;
  box-shadow: 0 10px 22px rgba(15, 23, 43, 0.12);
}

.cartToggle:hover,
.cartToggle:focus {
  background: #f0f3f8;
  outline: none;
}

.cartCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  margin-left: 6px;
  border-radius: 999px;
  background: #0b5a2c;
  color: #ffffff;
  font-size: 0.8rem;
}

.cartPanel {
  width: 280px;
  min-height: 260px;
  border: 3px solid #101218;
  border-radius: 16px;
  background: #ffffff;
  padding: 16px;
  box-sizing: border-box;
  box-shadow: 0 18px 32px rgba(15, 23, 43, 0.16);
}

.cartPanel.is-hidden {
  display: none;
}


#infoCard {
  width: 280px;
  min-height: 260px;
  border: 3px solid #101218;
  border-radius: 16px;
  background: #ffffff;
  padding: 16px;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.infoCardHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.infoCardHeader h2 {
  margin: 0;
  font-size: 1.2rem;
}

#infoToggle {
  display: none;
  border: 2px solid #1a1f2b;
  background: #f0f3f8;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.infoIntro {
  color: #394155;
  margin: 12px 0 12px;
}

.infoList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.infoList li {
  border: 2px solid #d6dce8;
  border-radius: 10px;
  background: #fbfcff;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.infoLabel {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #5a647d;
}

.infoValue {
  color: #131824;
  font-weight: 600;
}

.priceSummary {
  margin-top: 14px;
  border-top: 2px solid #e0e6f2;
  padding-top: 12px;
  display: grid;
  gap: 8px;
}

.priceSummary p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.infoTotal {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172b;
}



#phoneBase {
  position: relative;
  border: solid black 3px;
  border-radius: 30px;
  background-color: darkgray;
  width: 280px;
  height: 575px;
  flex: 0 0 auto;
}



#camera {
  position: absolute;
  left: 3px;
  top: 20px;
  border: solid black 3px;
  background: #d6d8df;
  width: 120px;
  height: 160px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#camera::before,
#camera::after {
  content: "";
  position: absolute;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2.5px solid #000000;
  background: #000000;
  opacity: 0;
  pointer-events: none;
}

#cameraFlash {
  position: absolute;
  top: 16px;
  left: 62px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #000000;
  background: #ffffff;
  pointer-events: none;
}

#camera:hover,
#battery:hover,
#gimmick:hover,
#camera:focus,
#battery:focus,
#gimmick:focus {
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.7);
  outline: none;
}

#camera.variant-basic {
  background: #8ea2c2;
}

#camera.variant-basic::before {
  opacity: 1;
  top: 18px;
  left: 15px;
  box-shadow: 0 55px 0 0 #000000, 0 55px 0 -2.5px #000000;
}

#camera.variant-pro {
  background: rgb(163, 3, 163);
}

#camera.variant-pro::before {
  opacity: 1;
  top: 13px;
  left: 15px;
  box-shadow: 0 45px 0 0 #000000, 0 45px 0 -2.5px #000000;
}

#camera.variant-pro::after {
  opacity: 1;
  top: 103px;
  left: 15px;
}

#camera.variant-ultra {
  background: rgb(212, 182, 8);
}

#camera.variant-ultra::before {
  opacity: 1;
  top: 15px;
  left: 15px;
  box-shadow: 0 60px 0 0 #000000, 0 60px 0 -2.5px #000000;
}

#camera.variant-ultra::after {
  opacity: 1;
  top: 45px;
  left: 60px;
}



#battery {
  position: absolute;
  left: 3px;
  bottom: 60px;
  border: solid black 3px;
  background: #d6d8df;
  width: 170px;
  height: 300px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#battery.variant-eco {
  background: #6cab5d;
}

#battery.variant-longlife {
  background: #cf9f39;
}

#battery.variant-powermax {
  background: #b65f5f;
}

#gimmick {
  position: absolute;
  right: 3px;
  top: 20px;
  border: solid black 3px;
  background: #d6d8df;
  width: 130px;
  height: 125px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#gimmick::before,
#gimmick::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

#gimmick.variant-pulse {
  background: #d7ecf5;
}

#gimmick.variant-pulse::before {
  left: 50%;
  top: 50%;
  width: 64px;
  height: 32px;
  transform: translate(-50%, -50%);
  border: 3px solid #0a3f58;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

#gimmick.variant-pulse::after {
  content: none;
}

#gimmick.variant-matrix {
  background: #1f2530;
}

#gimmick.variant-matrix::before {
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  border: 2px solid #0b1117;
  background:
    radial-gradient(circle at center, #53f78e 0 38%, transparent 40%) 0 0 / calc(100% / 16) calc(100% / 16),
    #0f151d;
  clip-path: circle(closest-side at 50% 50%);
}

#gimmick.variant-matrix::after {
  content: none;
}

#gimmick.variant-screen {
  background: #404755;
}

#gimmick.variant-screen::before {
  left: 7px;
  top: 7px;
  right: 7px;
  bottom: 7px;
  border: 2px solid #0b0f17;
  border-radius: 6px;
  background: linear-gradient(140deg, #87e6ff 0%, #2fa9d2 45%, #1a6f8d 100%);
}

#gimmick.variant-screen::after {
  left: 48px;
  bottom: 22px;
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: #0b0f17;
}



#selectionPanel {
  width: 330px;
  min-height: 500px;
  border: 3px solid #101218;
  border-radius: 16px;
  background: #ffffff;
  padding: 16px;
  box-sizing: border-box;
}

.cartHeader {
  margin-bottom: 16px;
}

.cartHeader h2 {
  margin: 0;
  font-size: 1.2rem;
}

.cartList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cartItem {
  border: 2px solid #d6dce8;
  border-radius: 10px;
  background: #fbfcff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.cartItemName {
  font-size: 0.9rem;
  font-weight: 600;
  color: #131824;
}

.cartItemPrice {
  font-size: 0.75rem;
  color: #5a647d;
}

.cartItemControls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.cartItemQuantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantityBtn {
  border: 1px solid #aab2c5;
  background: #f0f3f8;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #131824;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.quantityBtn:hover,
.quantityBtn:focus {
  background: #e0e6f2;
  border-color: #394155;
  outline: none;
}

.quantityDisplay {
  min-width: 25px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.removeBtn {
  border: 1px solid #d6dce8;
  background: #fff0f0;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c41f1f;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.removeBtn:hover,
.removeBtn:focus {
  background: #ffe0e0;
  border-color: #c41f1f;
  outline: none;
}

.emptyCartMsg {
  text-align: center;
  color: #5a647d;
  font-size: 0.9rem;
  margin: 30px 0;
}

.cartSummary {
  margin-top: 14px;
  border-top: 2px solid #e0e6f2;
  padding-top: 12px;
}

.cartTotal {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172b;
}

.addToCartBtn {
  border: 1px solid #aab2c5;
  background: #f0f3f8;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.addToCartBtn:hover,
.addToCartBtn:focus {
  background: #e0e6f2;
  border-color: #394155;
  outline: none;
}

.addWholeBtn {
  width: 100%;
  border: 2px solid #0b5a2c;
  background: #e9f8ef;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: #0b5a2c;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.addWholeBtn:hover,
.addWholeBtn:focus {
  background: #d9f1e3;
  border-color: #08472a;
  outline: none;
}

.panelHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.panelHeader h2 {
  margin: 0;
}

#closePanel {
  border: 2px solid #1a1f2b;
  background: #f0f3f8;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

#panelHint {
  color: #394155;
  margin: 10px 0 16px;
}

.options {
  display: grid;
  gap: 10px;
}

.optionButton {
  border: 2px solid #aab2c5;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.optionButton:hover,
.optionButton:focus {
  border-color: #394155;
  outline: none;
}

.optionButton.is-selected {
  border-color: #0b5a2c;
  background: #e9f8ef;
  font-weight: 700;
}

@media (max-width: 760px) {
  .appLayout {
    flex-direction: column;
    align-items: center;
  }

  .cartWidget {
    top: 12px;
    right: 12px;
  }

  #infoCard,
  #selectionPanel {
    width: 100%;
    min-height: auto;
  }

  .cartPanel {
    width: min(320px, calc(100vw - 24px));
  }

  #infoToggle {
    display: inline-block;
  }

  #infoCard:not(.is-expanded) .infoContent {
    display: none;
  }
}