/*
Theme Name: Denison Motors
Theme URI: https://denisonmotors.com
Author: Mohamed Shaheen
Author URI: mailto:work.mshaheen@gmail.com
Description: A custom WordPress theme for Denison Motors - Buy Here Pay Here dealership serving Denison, Sherman, Durant, and the Texoma area. Features in-house financing pre-approval forms, interactive map, and responsive design.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: denison-motors
Tags: one-page, custom-background, custom-logo, featured-images
*/

/* WordPress Core Overrides */
img.alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1em;
}
img.alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1em;
}
img.aligncenter {
  display: block;
  margin: 0 auto 1em;
}
.wp-caption {
  max-width: 100%;
}

/* Admin bar offset for sticky header */
body.admin-bar header.sticky {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar header.sticky {
    top: 46px;
  }
}

/* ── Inventory Page Styles ── */
.vehicle-card img { transition: opacity 0.3s; }
.filter-checkbox:checked + .filter-label { background: #1e40af; color: #fff; border-color: #1e40af; }
.view-btn.active { background: #1e40af; color: #fff; }
.view-btn { transition: all 0.15s; }

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #1e40af; cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #1e40af; cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
input[type="range"] {
  -webkit-appearance: none; height: 6px; border-radius: 3px; background: #cbd5e1; outline: none;
}

.img-carousel { position: relative; overflow: hidden; }
.img-carousel img { width: 100%; height: 100%; object-fit: cover; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.45); color: #fff; border: none;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.img-carousel:hover .carousel-btn { opacity: 1; }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.carousel-dot.active { background: #fff; }

/* List view */
.list-view .vehicle-card { display: grid; grid-template-columns: 320px 1fr; }
.list-view .vehicle-card .img-carousel { height: 220px; border-radius: 1rem 0 0 1rem; }
.list-view .vehicle-card .card-body { padding: 1.5rem; }
@media (max-width: 768px) {
  .list-view .vehicle-card { grid-template-columns: 1fr; }
  .list-view .vehicle-card .img-carousel { border-radius: 1rem 1rem 0 0; height: 200px; }
}

/* Mobile filter drawer */
.filter-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 50; }
.filter-overlay.open { display: block; }
.filter-drawer {
  position: fixed; top: 0; left: -100%; width: 320px; max-width: 85vw;
  height: 100%; background: #fff; z-index: 51; transition: left 0.3s;
  overflow-y: auto; padding: 1.5rem;
}
.filter-drawer.open { left: 0; }
@media (min-width: 1024px) {
  .filter-overlay { display: none !important; }
  .filter-drawer {
    position: sticky; top: 120px; width: 260px; min-width: 260px; max-width: 260px;
    max-height: calc(100vh - 140px); overflow-y: auto;
    padding: 0; display: block !important; left: auto; z-index: auto; background: transparent;
  }
}
