html, body {
  height: 100%;
}

/* main content should take remaining space */
main {
  flex: 1;
}

body {
    background: linear-gradient(180deg, #fff7ed 0%, #e0ecff 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.tool-detail-section {
    padding: 48px 0 80px;
}

.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.detail-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.tool-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 0 70px;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.tool-images {
    display: block;
}

.tool-images img {
    width: 100%;
    height: 420px;
    border-radius: 20px;
    object-fit: cover;
    background: #f3f4f6;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.tool-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 8px 14px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.85);
    color: #1f2937;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
}

.tool-info h1 {
    margin: 0;
    font-size: 2.3rem;
    line-height: 1.05;
    color: var(--text-main);
    letter-spacing: -1px;
}

.tool-info p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.tool-meta-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.tool-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #2e7d32;
    margin-bottom: 12px;
}

.availability {
    font-size: 0.96rem;
    color: var(--text-main);
    line-height: 1.6;
}

.detail-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.btn-reserve,
.btn-back {
    padding: 13px 22px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: 0.25s ease;
    white-space: nowrap;
}

.btn-reserve {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: 0 10px 22px rgba(194, 65, 12, 0.22);
}

.btn-reserve:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(194, 65, 12, 0.28);
}

.btn-back {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border: 2px solid rgba(30, 58, 138, 0.14);
}

.btn-back:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}
.tool-specs-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.tool-specs-card h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: var(--text-main);
}

.tool-specs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.spec-label {
  font-size: 0.88rem;
  color: #6b7280;
  font-weight: 700;
}

.spec-value {
  font-size: 0.96rem;
  color: #1f2937;
  font-weight: 600;
  text-align: right;
}

@media (max-width: 700px) {
  .spec-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .spec-value {
    text-align: left;
  }
}

@media (max-width: 980px) {
    .tool-detail-container {
        grid-template-columns: 1fr;
    }

    .tool-images img {
        height: 340px;
    }
}

@media (max-width: 700px) {
    .tool-detail-section {
        padding: 30px 0 60px;
    }

    .tool-detail-container {
        padding: 18px;
        border-radius: 20px;
    }

    .tool-info h1 {
        font-size: 1.9rem;
    }

    .detail-actions {
        flex-direction: column;
    }

    .btn-reserve,
    .btn-back {
        width: 100%;
    }

    .tool-images img {
        height: 260px;
    }
}

.owner-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f9f9f9;
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid #e5e5e5;
}

.owner-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.owner-info {
  display: flex;
  flex-direction: column;
}

.owner-label {
  font-size: 0.75rem;
  color: #888;
}

.owner-name {
  font-weight: 600;
  font-size: 1rem;
  color: #222;
}

#ownerCard {
  cursor: pointer;
  transition: box-shadow 0.2s;
}

#ownerCard:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-warning {
  text-align: center;
}

.warning-icon {
  font-size: 3rem;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-submit {
  background: #e53e3e;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-submit:hover {
  background: #c53030;
}

.btn-cancel {
  background: none;
  border: 1px solid #ddd;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-cancel:hover {
  background: #f5f5f5;
}