/* ===== Theme variables ===== */
:root {
    /* Brand palette */
    --color-navy: #0f1328;
    --color-dark-ink: #0a0e18;
    --color-gold: #fec935;
    --color-gold-deep: #d7a126;
    --color-red: #e60012;
    --color-red-soft: #ffe7ea;
    --color-amber: #f5b700;
    --color-pink: #f48fb1;
    --color-teal: #00787d;
    --color-cyan: #00c4cc;
    --color-green: #4caf50;

    /* Neutrals */
    --color-black: #000;
    --color-text-main: #111;
    --color-gray-700: #444;
    --color-gray-600: #666;
    --color-gray-500: #777;
    --color-gray-300: #e5e5e5;
    --color-gray-275: #efefef;
    --color-gray-250: #f2f2f2;
    --color-gray-225: #f3f3f3;
    --color-white: #fff;

    /* Legacy aliases */
    --header-navy: var(--color-navy);
    --header-gold: var(--color-gold);
    --header-gray: var(--color-gray-250);
    --text-main: var(--color-text-main);
}

/* ===== Base elements ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    margin: 0;
    font-family: 'Mulish', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    color: var(--text-main);
    background: #fff;
    font-size: 16px;
    line-height: 1.5;
}

/* Rating display used by pw_show_star() */
.pw-rating { display: inline-flex; align-items: center; gap: 0.5rem; }
.pw-rating__stars { position: relative; display: inline-block; line-height: 1; letter-spacing: 2px; font-size: 18px; }
.pw-rating__stars--bg { color: #ddd; display: inline-block; }
.pw-rating__stars--fg { color: #f3c623; position: absolute; left: 0; top: 0; overflow: hidden; display: inline-block; }
.pw-rating__text { font-weight: 600; color: #111; }

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: min(1320px, 100%);
    padding: 0 1rem;
    margin: 2rem auto;
}
.wp-caption {
    max-width: 100%;
    margin: 1rem auto;
}
.wp-caption-text {
    background: var(--color-gray-300);
    text-align: center;
    padding: .25rem 1rem;
    font-size: .9rem;
}
/* ===== Buttons & inputs ===== */
button, .btn,
input[type="button"], input[type="submit"],
button[type="button"], button[type="submit"] {
    background: var(--color-gold);
    border: none;
    color: #000;
    font-size: .9rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0 1rem;
    line-height: 2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
button:hover, .btn:hover,
input[type="button"]:hover, input[type="submit"]:hover,
button[type="button"]:hover, button[type="submit"]:hover {
    background: var(--color-gold-deep);
    color: #000;
}
input {
    border: 2px solid var(--header-gold);
    border-radius: 999px;
    padding: 0 .5rem;
    font-size: .9rem;
    line-height: 2;
    background: #f3f3f3;
    color: #111;
    outline: none;
    max-width: 100%;
}

.wpcf7-form .cf7-field {
    margin-bottom: .5rem;
}
.wpcf7-form .cf7-row {
    display: flex;
    gap: .5rem;
}
.wpcf7-form .cf7-field input {
    width: 100%;
}
.wpcf7-form .cf7-field.half {
    width: calc(50% - 0.25rem);
}
.wpcf7-form span[data-name="san-pham"],
.wpcf7-form span[data-name="ho-ten"],
.wpcf7-form span[data-name="phone"] {
    display: flex;
    width: 100%;
}
.wpcf7-form span[data-name="san-pham"] input,
.wpcf7-form span[data-name="ho-ten"] input,
.wpcf7-form span[data-name="phone"] input {
    padding-left: 2rem;
}
.wpcf7-form span[data-name="san-pham"]::before,
.wpcf7-form span[data-name="ho-ten"]::before,
.wpcf7-form span[data-name="phone"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: .5rem;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.9;
}
.wpcf7-form span[data-name="san-pham"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23111'%3E%3Cpath d='M7 18h10v2H7zM6 2h12a2 2 0 0 1 2 2v12H4V4a2 2 0 0 1 2-2zm0 2v10h12V4zM8 6h8v2H8zm0 4h5v2H8z'/%3E%3C/svg%3E") ;
}
.wpcf7-form span[data-name="ho-ten"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23111'%3E%3Cpath d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-4 0-8 2-8 4v2h16v-2c0-2-4-4-8-4z'/%3E%3C/svg%3E");
}
.wpcf7-form span[data-name="phone"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23111'%3E%3Cpath d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1-.24 11.36 11.36 0 0 0 3.57.57 1 1 0 0 1 1 1V21a1 1 0 0 1-1 1A18 18 0 0 1 3 5a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1 11.36 11.36 0 0 0 .57 3.57 a1 1 0 0 1-.24 1z'/%3E%3C/svg%3E");
}
.wpcf7-form .cd-upload-btn {
    display: inline-flex;
    background: var(--header-gold);
    border-radius: 999px;
    padding: 0 .5rem;
    line-height: 2;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    color: #111;
}
.wpcf7-form .codedropz-upload-handler {
    border: 2px solid var(--header-gold);
    padding: .5rem;
    position: relative;
    background: #f3f3f3;
    border-radius: 1rem;
}
.wpcf7-form .codedropz-upload-container {
    padding: 0;
}

.wpcf7-form .codedropz-upload-inner {
    position: relative;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    line-height: 1rem;
}

.wpcf7-form .dnd-upload-counter {
    right: 10px;
}

.wpcf7-form .cf7-upload.is-dragover {
  box-shadow: 0 0 0 3px rgba(215, 161, 38, 0.3);
}

.wpcf7-form .cf7-upload.has-file .upload-text,
.wpcf7-form .cf7-upload.has-file .upload-btn {
  display: none;
}
.wpcf7-form .cf7-upload-info {
  width: 100%;
  margin-top: 8px;
}
.wpcf7-form .cf7-upload-info:empty {
  display: none;
}
.wpcf7-form .cf7-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wpcf7-form .cf7-upload-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
}
.wpcf7-form .cf7-upload-name {
  font-weight: 700;
  color: #111;
  flex: 0 0 auto;
  max-width: 45%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wpcf7-form .cf7-upload-remove {
  border: none;
  background: #efefef;
  color: #444;
  padding: 6px 10px;
  border-radius: 8px;
}

/* Two-column cart + embedded checkout layout */
.pw-cart-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.pw-cart-left {
    flex: 0 0 350px;
    max-width: 350px;
}

/* Notifications (toast) */
.pw-notify-container {
    position: fixed;
    right: 16px;
    top: 16px;
    z-index: 100002;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none; /* let clicks pass through container, but individual toasts can receive pointer-events */
}
.pw-notify {
    pointer-events: auto;
    min-width: 220px;
    max-width: min(100%, 360px);
    background: rgba(17,17,17,0.95);
    color: #fff;
    padding: 12px 14px;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(11,13,23,0.45);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(-6px) scale(0.995);
    transition: opacity 220ms cubic-bezier(.2,.9,.2,1), transform 220ms cubic-bezier(.2,.9,.2,1);
}
.pw-notify.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.pw-notify--success { background: linear-gradient(180deg, #1b7a3a 0%, #14904a 100%); }
.pw-notify--error { background: linear-gradient(180deg, #b71c1c 0%, #e53935 100%); }
.pw-notify--info { background: linear-gradient(180deg, #2b6fb3 0%, #1e88e5 100%); }

@media (max-width: 640px) {
    .pw-notify-container { right: 10px; left: 10px; top: 10px; align-items: center; }
    .pw-notify { max-width: 100%; width: auto; }
}

.pw-cart-right {
    flex: 1 1 auto;
    min-width: 0; /* allow overflow hidden behaviors */
}
.pw-cart-left .woocommerce-billing-fields,
.pw-cart-left #payment {
    background: #fff;
    border: 1px solid var(--color-gray-225);
    padding: 1rem;
    border-radius: 8px;
}
@media (max-width: 900px) {
    .pw-cart-layout { display: block; }
    .pw-cart-left, .pw-cart-right { max-width: 100%; width: 100%; }
    .pw-cart-left { margin-bottom: 1.5rem; }
}

/* ===== Layout ===== */
.container.layout:has(.sidebar) {
    display: grid;
    gap: .75rem;
    align-items: start;
}
.container.layout:has(.sidebar--left) {
    grid-template-columns: 300px 1fr; 
}
.container.layout:has(.sidebar--right) {
    grid-template-columns: 1fr 300px;
}
.container.layout .container {
    padding: 0;
}

.container.layout section .container{
    max-width: 100%;
    width: 100%;
    margin: 1.5rem 0;
}

@media (max-width: 1100px) {

    .container.layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .container.layout .sidebar {
        width: 100%;
    }

}

/* ===== Contact Form 7 ===== */
.wpcf7-response-output,
.wpcf7-not-valid-tip,
.wpcf7-spinner {
    display: none !important;
}

#wpcf7-f63-o1 {
    margin: 0 auto;
}

/* === WRAPPER === */
#wpcf7-f63-o1 .cf7-wrap {
    padding: .75rem;
    background: #fff;
    color: #111;
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='%23fec935' stroke-width='3' stroke-dasharray='11' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
}

/* === COUNTDOWN === */
#wpcf7-f63-o1 .cf7-countdown {
    display: flex;
    justify-content: space-around;
    gap: 12px;
    margin-bottom: 16px;
}

/* === Contact form: Product quote (ID 431) === */
#wpcf7-f431-o1 .cf7-wrap {
    border: 2px dashed #f6c33a;
    padding: 0.75rem;
    background: #fffdf4;
    border-radius: .5rem;
}
#wpcf7-f431-o1 button[type="submit"] {
    display: flex;
    width: 100%;
    line-height: 1.2;
    padding: .5rem;
    border-radius: .5rem;
}
#wpcf7-f431-o1 .codedropz-upload-handler {
    padding: 0.25rem;
}
#wpcf7-f431-o1 .codedropz-upload-inner {
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {

    #wpcf7-f431-o1 .cf7-row {
        grid-template-columns: 1fr;
    }

}

#wpcf7-f63-o1 .cf7-countdown div {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#wpcf7-f63-o1 .cf7-countdown strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 2px;
}

#wpcf7-f63-o1 .cf7-countdown span {
  font-size: 13px;
}


/* === CAPTCHA === */
#wpcf7-f63-o1 .cf7-captcha {
    margin: 6px 0 12px;
    display: flex;
    justify-content: center;
}

/* === SUBMIT === */
#wpcf7-f63-o1 .cf7-submit input[type="submit"] {
    line-height: 3;
    display: flex;
    margin: auto;
    min-width: 220px;
}

/* === RESPONSIVE === */
@media (max-width: 767px) {

  #wpcf7-f63-o1 .cf7-row {
    flex-direction: column;
  }

  #wpcf7-f63-o1 .cf7-countdown {
    flex-wrap: wrap;
  }

}


/* ===== Sections (header, nav, home, etc.) ===== */

/* ===== Header ===== */
.site-header {
    position: relative;
    top: 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100001;
}

/* === Section edit link (admin only) === */
.section .container {
    position: relative;
}

.section-edit-link {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 14px;
  text-decoration: none;
  z-index: 2;
}

.section-edit-link:hover {
  background: #d7a126;
  color: #000;
}
@media (max-width: 1200px) {
    .header-top {
        display: none;
    }
}

/* === Countdown === */
.pw-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}
.pw-countdown__segment {
    display: grid;
    justify-items: center;
    gap: .25rem;
}
.pw-countdown__value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 44px;
    padding: 0 .5rem;
    background: #e11f26;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: .35rem;
    letter-spacing: 0.5px;
}
.pw-countdown__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #111;
}
.pw-countdown__separator {
    color: #e11f26;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1;
    margin-top: -12px;
}

