/* ==============================
   1. COLOR PALETTE: White & Blues
   ============================== */
:root {
    --accent: #3498db;       /* primary blue */
    --accent-dark: #217dbb;  /* darker blue for hovers */
    --bg: #ffffff;           /* pure white background */
    --text: #2c3e50;         /* dark navy-gray text */
    --border: #d0d7de;       /* light gray border */
    --btn-radius: 6px;
}

/* ==============================
   2. BASE RESET & TYPOGRAPHY
   ============================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

a:link,
a:visited {
    text-decoration: none;
    color: inherit;
    text-align: center;
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding: 1rem;
}

.logo {
    width: 100%;
}

/* ==============================
   3. CONTAINER + FORM STRUCTURE
   ============================== */
.container {
    max-width: 1000px;
    margin: 2rem 0rem;
    background: var(--bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-title {
    color: var(--accent);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.service-section {
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
    width: 100%;
}

.input-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.grid-2 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ==============================
   4. PRICE + NEXT BUTTON IN SAME ROW
   ============================== */
.sticky-footer {
    position: sticky;
    bottom: 1rem;
    background: var(--bg);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0px 150px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

#pricePreview {
    font-size: 1.2rem;
    font-weight: 800;
    color: black;
}

.submitBtn {
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--btn-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.submitBtn:hover {
    background: var(--accent-dark);
}

/* ==============================
   5. GRID STYLES FOR FURNITURE, DEEP, DISINFECTION
   ============================== */
#furnitureGrid,
#deepGrid,
#disinfectionGrid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-section {
    width: 100%;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg);            
    scroll-margin-top: 100px;
}

.category-banner {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    margin: 1rem 0;
}

.items-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

/* ==============================
   6. ITEM CARD: FURNITURE (UNCHANGED)
   ============================== */
.item-card {
    display: grid;
    grid-template-columns: 15% 60% 25%;
    grid-template-rows: auto auto;
    grid-template-areas:
        "image  title   title"
        "image  price   controls";
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    align-items: center;
    height: auto;
}

.item-card img {
    grid-area: image;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-right: 2px solid var(--border);
}

.card-info {
    grid-area: title;
    padding: 1rem;
}

.card-info h4 {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card-info p.desc {
    font-size: 0.95rem;
    color: #555;
}

.card-price {
    grid-area: price;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-dark);
}

.card-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.card-controls .qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent-dark);
  background: transparent;
  color: var(--accent-dark);
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-controls .qty-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

.card-controls .qty-btn:disabled {
  border-color: #ccc;
  color: #ccc;
  cursor: not-allowed;
  background: transparent;
}

.card-controls span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  min-width: 1.5rem;
  text-align: center;
}

/* ==============================
   7. ITEM CARD: DEEP & DISINFECTION (TWO‐COL GRID)
   ============================== */
.deep-card,
.disinf-card {
    display: grid;
    grid-template-columns: 65% 35%;
    grid-template-rows: auto auto;
    grid-template-areas:
        "title   title"
        "price   controls";
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    align-items: center;
    height: auto;
}
.deep-card .card-info,
.disinf-card .card-info {
    grid-area: title;
    padding: 1rem;
}
.deep-card .card-price,
.disinf-card .card-price {
    grid-area: price;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-dark);
}
.deep-card .card-controls,
.disinf-card .card-controls {
    grid-area: controls;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    gap: 0.5rem;
    padding: 0.5rem;
}

/* Reuse same .qty-btn style from above */

/* ==============================
   8. TAB PANE ABOVE SECTIONS
   ============================== */
.tab-pane {
    display: flex;
    justify-content: center; /* <-- center-align all buttons */
    gap: 1rem;
    margin-bottom: 4rem;
    position: sticky;
    top: 0;
    background: var(--bg);
    padding: 0rem 0;
    z-index: 10;
    flex-wrap: wrap;
}

/* Furniture tab buttons: use their banner images */
#furnitureTabs button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s ease;
}
#furnitureTabs button img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    border: 2px solid var(--border);
}
#furnitureTabs button.active img,
#furnitureTabs button:hover img {
    border-color: var(--accent-dark);
    transform: translateY(-2px);
}

/* Deep tab buttons (2 per row desktop, 100% mobile) */
#deepTabs button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s ease;
}
#deepTabs button img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    border: 2px solid var(--border);
}
#deepTabs button.active img,
#deepTabs button:hover img {
    border-color: var(--accent-dark);
    transform: translateY(-2px);
}

/* Disinfection tab buttons (same as Deep) */
#disinfectionTabs button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s ease;
}
#disinfectionTabs button img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    border: 2px solid var(--border);
}
#disinfectionTabs button.active img,
#disinfectionTabs button:hover img {
    border-color: var(--accent-dark);
    transform: translateY(-2px);
}

/* Furniture tab widths */
@media (min-width: 769px) {
    /* Desktop: 4 per row for furniture => 25% minus small gaps */
    #furnitureTabs button {
        width: calc(50% - 1rem);
    }
    /* Desktop: 2 per row for deep/disinfection => 50% minus gaps */
    #deepTabs button,
    #disinfectionTabs button {
        width: calc(50% - 1rem);
    }
    .container {
      width: 700px;            /* or whatever fixed width you prefer */
      margin: 2rem auto;       /* keep it centered */
      padding: 1.5rem;
    }
}
@media (max-width: 768px) {
    /* Mobile: 2 per row for furniture => 50% minus gap */
    #furnitureTabs button {
        width: calc(50% - 1rem);
    }
    /* Mobile: full width for deep/disinfection => 100% */
    #deepTabs button,
    #disinfectionTabs button {
        width: calc(50% - 1rem);
    }
}

/* ==============================
   9. MULTI-STEP VISIBILITY
   ============================== */
.step {
    display: none;
}
.step.active {
    display: block;
}

/* ==============================
   10. CONFIRMATION MESSAGE
   ============================== */
.confirmation {
    text-align: center;
    padding: 2rem;
    display: none;
}
.confirmation h2 {
    color: var(--accent);
    margin-bottom: 1rem;
}
.confirmation pre {
    text-align: left;
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

/* ==============================
   11. LOADING & INVALID STATES
   ============================== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}
.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 3px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: loading 1s ease infinite;
}
@keyframes loading {
    from { transform: rotate(0turn); }
    to   { transform: rotate(1turn); }
}

input:invalid,
select:invalid,
textarea:invalid {
    border-color: #e74c3c;
    animation: shake 0.5s ease-in-out;
}
@keyframes shake {
    0%, 100%   { transform: translateX(0); }
    25%        { transform: translateX(-5px); }
    75%        { transform: translateX(5px); }
}

/* ==============================
   12. MOBILE ADJUSTMENTS (≤768px)
   ============================== */
@media (max-width: 768px) {
    .container {
        width: 100%;
        margin: 0;
        padding: 0rem;
        border-radius: 0;
    }
    .form-header {
        margin-bottom: 0.25rem;
    }
    .form-title {
        font-size: 1.8rem;
        margin-bottom: 0.3rem;
    }
    .service-section {
        margin-bottom: 1rem;
        padding: 0.5rem;
        border-radius: 4px;
    }
    .input-group {
        margin-bottom: 1rem;
    }
    input,
    select,
    textarea {
        padding: 0.5rem;
        border-width: 1px;
        border-radius: 4px;
    }
    .sticky-footer {
        padding: 0.1rem 0.5rem;
        display: flex;
        flex-direction: row;
        margin: 0px 0px;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }
    #pricePreview {
        font-size: 1.2rem;
        font-weight: 800;
    }
    .submitBtn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        border-radius: 4px;
    }
    .category-section {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
        scroll-margin-top: 130px;
    }
    .deep-card,
    .disinf-card {
        display: grid;
        grid-template-columns: 65% 35%;
        grid-template-rows: auto auto;
        grid-template-areas:
        "title   title"
        "price   controls";
        background: var(--bg);
        border: 2px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
        align-items: center;
        height: auto;
    }
    .item-card {
        display: grid;
        grid-template-columns: 35% 40% 25%;
        grid-template-rows: auto auto;
        grid-template-areas:
        "image  title   title"
        "image  price   controls";
        background: var(--bg);
        border: 2px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
        align-items: center;
        height: auto;
    }
    .item-card img {
        /* Furniture only: shrink in mobile */
        width: 100%;
        height: auto;
        margin-left: 0px;
        object-fit: cover;
    }
    .category-banner {
        margin: 0.5rem 0;
    }
    .card-info h4 {
        font-size: 0.99rem;
    }
    .card-info {
        padding: 1rem;
        font-size: 1rem;
    }
    .card-controls {
        padding: 0.3rem;
        gap: 0.3rem;
    }
    .tab-pane {
        padding: 0rem 0;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    .tab-pane button img {
        border-radius: 4px;
    }
    .confirmation {
        padding: 1rem;
    }
    .confirmation pre {
        padding: 0.8rem;
    }
}