/* ── Store page styles ───────────────────────────────────── */
/* Source: competitor coupon.css — class names kept as-is    */

/* ── Fonts ───────────────────────────────────────────────── */
@font-face {
    font-family: 'EuclidCircularB';
    src: url('../fonts/EuclidCircularB-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'EuclidCircularB';
    src: url('../fonts/EuclidCircularB-Medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'EuclidCircularB';
    src: url('../fonts/EuclidCircularB-SemiBold.woff2') format('woff2');
    font-weight: 600 700; font-style: normal; font-display: swap;
}

/* ── Base resets (scoped to storepage) ───────────────────── */
.storepage *, .storepage *::before, .storepage *::after { box-sizing: border-box; }
.storepage {
    font-family: 'EuclidCircularB', system-ui, -apple-system, sans-serif;
    font-size: 16px; color: #333;
    -webkit-font-smoothing: antialiased;
    background: #fff; min-height: 60vh;
}
.storepage a { color: #333; text-decoration: none; cursor: pointer; }
.storepage img { max-width: 100%; vertical-align: middle; }
.storepage h1, .storepage h2, .storepage h3,
.storepage p, .storepage ol, .storepage ul { margin: 0; padding: 0; }

/* ── Wrapper ─────────────────────────────────────────────── */
.storepage .wrapper {
    position: relative; margin: 0 auto;
    padding-left: 20px; padding-right: 20px;
}

/* ── Page layout ─────────────────────────────────────────── */
.storepage .pagecontent { margin-top: 20px; }

/* ── Store header ────────────────────────────────────────── */
.detail-page-block {
    display: flex; align-items: center;
    min-height: 70px; height: auto; margin-bottom: 20px;
}
.detail-page-img {
    width: 70px; height: 70px; flex: 0 0 70px; margin-right: 16px;
    border: 1px solid #e8e8e8; border-radius: 4px;
    object-fit: contain; background: #fff;
}
.cs-detail-page-logo-placeholder {
    width: 70px; height: 70px; flex: 0 0 70px; margin-right: 16px;
    border: 1px solid #e8e8e8; border-radius: 4px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; color: #d33c3c;
}
.detail-page-tl { font-size: 22px; font-weight: 700; line-height: 1; }
.cs-store-count  { font-size: 14px; color: #999; margin-top: 6px; }

/* ── Section heading ─────────────────────────────────────── */
.common-tl {
    font-size: 24px; font-weight: 700; line-height: 1.4;
    position: relative; margin-top: 18px; margin-bottom: 18px;
}

/* ── Coupon list ─────────────────────────────────────────── */
.detail-ls { margin-top: 20px; }
.detail-item { margin-bottom: 16px; }

.detail-con {
    position: relative; display: flex; align-items: center;
    transition: all ease 0.25s;
    border: 1px solid #e8e8e8; border-radius: 8px;
    height: 120px; background: #fff;
}
.detail-con:hover { box-shadow: 0 0 12px 0 rgba(17,17,17,0.1); }

.coverlink { position: absolute; z-index: 3; top: 0; right: 0; bottom: 0; left: 0; }

.detail-left { flex: 1; display: flex; }

.detail-box {
    flex: 0 0 90px; width: 90px; min-height: 80px;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    border-right: 1px dashed #e1e1e1;
}
.detail-box img { display: none; }
.detail-box span {
    overflow-wrap: break-word; word-break: break-word;
    color: #d33c3c; text-align: center;
    font-size: 15px; line-height: 20px; font-weight: 700;
}

.detail-info {
    flex: 1; margin-left: 12px; margin-right: 12px;
    display: flex; flex-direction: column; justify-content: center;
}
.detail-top-tag { display: flex; align-items: center; gap: 10px; }
.detail-safe { display: flex; align-items: center; gap: 4px; }
.detail-safe img { width: 15px; height: 15px; }
.detail-safe span { font-size: 14px; line-height: 20px; color: #00c6a5; }

.detail-tag { font-size: 14px; display: block; color: #d33c3c; text-transform: capitalize; }
.detail-tl {
    font-size: 15px; line-height: 1.4; font-weight: 400; margin-bottom: 4px;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    overflow: hidden; text-overflow: ellipsis;
}
.detail-info-bot { display: flex; justify-content: space-between; align-items: center; }
.detail-used-ls { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.detail-used { font-size: 12px; line-height: 1.2; color: #aaa; }
.detail-used + .detail-used { border-left: 1px solid #999; padding-left: 2px; }

/* ── Desktop code button ─────────────────────────────────── */
.detail-pc { display: none; }
.new-con-rt { font-size: 14px; font-weight: 700; padding: 16px; white-space: nowrap; }
.new-con-rt-code {
    position: relative; display: flex; overflow: hidden;
    box-sizing: content-box; width: 100%; height: 40px; border-radius: 8px;
}

.store-get-btn {
    font-weight: 700; line-height: 40px;
    position: absolute; display: flex; align-items: center; justify-content: flex-end;
    width: 170px; height: 40px;
    padding-right: 4px; color: #aaa; background-color: #f5f5f5;
    border-radius: 8px; cursor: pointer;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

.rtcode-border {
    position: absolute; z-index: 9999; top: 0; left: 0;
    box-sizing: content-box; width: calc(100% - 2px); height: 38px;
    pointer-events: none; border: 1px dashed #d33c3c;
    border-radius: inherit; background-color: transparent;
}

.rtcode-transition {
    position: absolute; width: calc(100% - 20px); height: 100%;
    transition: all 0.2s linear; background-color: #d33c3c;
}
.rtcode-transition::before {
    position: absolute; top: unset; right: -20px; bottom: 0;
    width: 20px; height: calc(100% - 20px); content: '';
    transition: all 0.2s linear;
    border-radius: 0; border-bottom-right-radius: 8px; background-color: #d33c3c;
}

.rtcode-minibox {
    position: absolute; top: 10px; right: -10px; left: unset;
    width: 10px; height: 10px; transition: all 0.2s linear;
    border-top-right-radius: 50%; background: #d33c3c;
}

.rtcode-angle {
    position: absolute; top: 0; right: -20px; transition: all 0.2s linear;
    border-top: 10px solid transparent; border-right: 10px solid transparent;
    border-bottom: 10px solid #aaa; border-left: 10px solid #aaa;
    border-bottom-left-radius: 8px; background-color: transparent;
}

.store-con-get {
    font-size: 14px; font-weight: 700;
    position: absolute; left: 50%; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    width: calc(100% - 60px); height: 100%;
    transform: translate(-50%);
    text-align: center; color: #fff;
    background-color: #d33c3c; border-radius: 8px; cursor: pointer;
}

/* Deal-type "Get Deal" button (simple, no code reveal) */
.new-con-get {
    line-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: #383838;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

/* Copied state */
.new-con-rt-code.is-copied .store-get-btn { color: #00c6a5; }
.new-con-rt-code.is-copied .store-con-get { background-color: #00c6a5; }

/* ── Similar Offers ──────────────────────────────────────── */
.cate-brand-ls { display: flex; flex-wrap: wrap; margin-left: -16px; margin-top: 20px; }
.cate-brand-item { width: 50%; padding-left: 16px; margin-bottom: 16px; }
.cate-brand-con {
    padding: 14px 12px; text-align: center; border-radius: 12px;
    border: 1px solid #E4E4E4; position: relative; transition: border-color 0.2s;
}
.cate-brand-con:hover { border-color: #df3636; }
.cate-brand-con:hover .cate-brand-name { color: #df3636; }
.cate-brand-con:hover .rightHalf::before { border-color: #df3636; border-right-color: #fff; }
.cate-brand-con:hover .leftHalf::after  { border-color: #df3636; border-left-color: #fff; }

.cate-brand-top {
    position: relative; width: 90px; height: 90px;
    border-radius: 8px; overflow: hidden;
    border: 1px solid #E4E4E4; margin: 0 auto; background: #fff;
}
.cate-brand-img {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%; object-fit: contain; transition: all 0.25s ease;
}
.cs-brand-placeholder {
    position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: #d33c3c;
}
.cate-brand-line { position: relative; margin: 10px 6px; border-bottom: 1px dashed #CCC; }
.rightHalf, .leftHalf {
    position: absolute; width: 20px; height: 20px; top: -10px;
    border-top-left-radius: 16px; border-top-right-radius: 16px;
    background-color: #fff;
}
.rightHalf::before, .leftHalf::after { content: ''; position: absolute; width: 50%; height: 100%; border: 1px solid #E4E4E4; }
.rightHalf { right: -19px; }
.rightHalf::before { border-right: 1px solid #fff; border-radius: 16px 0 0 16px; }
.leftHalf  { left: -29px; }
.leftHalf::after { border-left: 1px solid #fff; border-radius: 0 1rem 1rem 0; }

.cate-brand-detail { margin-top: 8px; }
.cate-brand-name {
    color: #333; font-size: 18px; line-height: 1.2; font-weight: 500;
    word-break: break-word;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1;
    overflow: hidden; text-overflow: ellipsis;
}
.cate-brand-num { font-size: 14px; line-height: 1.2; margin-top: 4px; color: #999; }

/* ── Sidebar categories ──────────────────────────────────── */
.catels-radius { display: flex; flex-wrap: wrap; margin-left: -12px; margin-top: 8px; }
.cateitem-radius { width: 100%; padding-left: 12px; padding-bottom: 12px; }
.catecon-radius {
    position: relative;
    display: flex; align-items: center; flex-direction: column; justify-content: center;
    padding: 12px 0 2px; text-align: left;
    border: 1px solid #000; border-radius: 8px;
    background: #fff; transition: border-color 0.2s;
}
.catecon-radius:hover { border: 1px solid #df3636; }
.catecon-pic-place {
    position: relative; overflow: hidden;
    width: 36px; height: 36px; background-color: transparent;
    display: flex; align-items: center; justify-content: center;
}
.catecon-pic-radius { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
.cs-cat-initial { font-size: 18px; font-weight: 700; color: #d33c3c; }
.catecon-tl-radius {
    display: flex; align-items: center; justify-content: space-between;
    flex: 1; font-size: 14px; font-weight: 400; color: #333; line-height: 1.3;
    padding: 6px 8px 8px; width: 100%;
}
.catecon-tl-radius span {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1;
    overflow: hidden; text-overflow: ellipsis;
}
.catecon-radius:hover .catecon-tl-radius { color: #df3636; }
.icon-aright { width: 20px; height: 20px; fill: #333; flex-shrink: 0; }
.catecon-radius:hover .icon-aright { fill: #df3636; }

/* pageright: horizontal row layout */
.pageright .catecon-radius { flex-direction: row; padding: 12px; gap: 12px; }
.pageright .catecon-pic-place { width: 44px; height: 44px; flex: 0 0 44px; }
.pageright .catecon-tl-radius { font-size: 15px; padding: 0; }
.pageright .icon-aright { width: 20px; height: 20px; }

/* ── Pagination ──────────────────────────────────────────── */
.cs-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 24px 0;
}
.cs-page-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 6px;
    border: 1px solid #e0e0e0; font-size: 14px; color: #333;
    text-decoration: none; transition: all 0.2s;
}
.cs-page-link:hover, .cs-page-link.is-active { background: #d33c3c; color: #fff; border-color: #d33c3c; }
.cs-page-ellipsis { font-size: 14px; color: #aaa; padding: 0 4px; }

/* ── 768px ───────────────────────────────────────────────── */
@media screen and (min-width: 768px) {
    .detail-page-block { height: auto; min-height: 100px; }
    .detail-page-img { width: 100px; height: 100px; flex: 0 0 100px; }
    .cs-detail-page-logo-placeholder { width: 100px; height: 100px; flex: 0 0 100px; font-size: 32px; }
    .detail-page-tl { font-size: 24px; line-height: 1.4; }
    .detail-con { height: 130px; }
    .detail-left { height: 100%; }
    .detail-box { display: flex; flex: 0 0 150px; width: 150px; min-height: 98px; justify-content: center; }
    .detail-box span { font-size: 18px; line-height: 24px; padding: 0 16px; flex: 1; display: flex; justify-content: center; align-items: center; }
    .detail-info { margin-left: 20px; justify-content: center; }
    .detail-tl { font-size: 18px; margin-top: 6px; margin-bottom: 12px; }
    .detail-info-bot { flex-wrap: nowrap; gap: 8px; }
    .detail-used { font-size: 14px; padding-right: 4px; }
    .detail-used + .detail-used { padding-left: 6px; }
    .detail-pc { display: block; }
    .new-con-rt { display: flex; align-items: center; flex-direction: column; flex: 0 0 197px; width: 197px; }
    .store-get-btn { width: 172px; overflow: hidden; }
    .cate-brand-item { width: 25%; padding-left: 20px; }
    .cate-brand-ls { margin-left: -20px; }
}

/* ── 1200px ──────────────────────────────────────────────── */
@media screen and (min-width: 1200px) {
    .storepage .wrapper { max-width: 1136px; margin: 0 auto; }
    .storepage .pagecontent { display: flex; }
    .storepage .pageleft { flex: 0 0 728px; width: 728px; }
    .storepage .pageright { flex: 1; width: 300px; padding-left: 68px; }
    .pageright .cateitem-radius { width: 100%; }
    .detail-con:hover .rtcode-transition { width: calc(100% - 30px); }
    .detail-con:hover .rtcode-transition::before { right: -30px; width: 30px; height: calc(100% - 30px); }
    .detail-con:hover .rtcode-angle {
        right: -30px;
        border-top: 15px solid transparent; border-right: 15px solid transparent;
        border-bottom: 15px solid #aaa; border-left: 15px solid #aaa;
    }
    .detail-con:hover .rtcode-minibox { top: 15px; right: -15px; width: 15px; height: 15px; }
}
